[resolved] [closed] Responsive images: src url is https, srcset url is http -> no images loaded (19 posts)
https://wordpress.org/support/topic/responsive-images-src-url-is-https-srcset-url-is-http-no-images-loaded
SSL for One Domain on Multisite
http://halfelf.org/2014/ssl-for-one-domain-on-multisite/
Moving to HTTPS on WordPress
https://css-tricks.com/moving-to-https-on-wordpress/
Avoid SSL Mixed Content Errors in WordPress
https://crowdfavorite.com/avoid-ssl-mixed-content-errors-in-wordpress/
Theme My Login 로그인 화면을 사용자 정의
http://dream-blog.info/blog/wordpress/120.html
WordPress에서 회원제 사이트를 구축 해보자 (사전 준비)
http://www.rokurofire.info/2014/10/08/wp_membership1/
Wordpress 멀티 사이트 회원 페이지를 만들 때 여러가지 [Theme My Login]
http://qiita.com/hanoopy/items/fc9055946dffd90270b2
서버 측 처리를 5 배 향상 (WordPress)
http://qiita.com/kouma1990/items/e323851b80466ef35169
wordpress에서 스마트 폰 브라우저별로 표시를 분기하는 방법
http://qiita.com/yumayamada1029/items/e5f3eb6e1e05264b2714
[AWS] WordPress 설치 및 RDS, S3의 연계
http://qiita.com/hisayuki/items/d4bd05fa152b1e54a43d
Using “Theme My Login” with Profile
https://anspress.io/questions/question/using-theme-my-login-with-profile/
Intelligence-Driven Incident Response with YARA
https://www.sans.org/reading-room/whitepapers/forensics/intelligence-driven-incident-response-yara-35542
"YARA 규칙"고 ClamAV
https://oss.sios.com/security/antivirus-security-20151215
ClamAV는 0.99에서 YARA를 지원하도록되어 있으며 , clamscan 등에서 YARA Rule 파일을 서명으로 스캔 할 수있게되어 있습니다.
ClamAV에서 YARA를 사용하는 경우에는 다음과 같이 두 가지 방법이 있습니다.
1. YARA Rule을 ".yar"또는 ".yara"확장자로 clamav의 DB가있는 디렉토리 (예 : Debian의 경우에는 / var / lib / clamav)에 배치합니다.
2. YARA Rule 파일 ( ".yar")를 clamscan 등에서 직접 "--database ="로 지정합니다.
대표적인 YARA 규칙은 http://yararules.com/ 에서 다운로드 할 수 있습니다.
다음은 텍스트에서 일치하는 간단한 YARA Rule을 만들어 테스트하고 있습니다. .
sampe_text.yar)
rule YARA_Rule_Sample {
strings :
$ my_text_string = "Test"
condition :
$ my_text_string
}
아래와 같은 샘플의 text 파일을 준비합니다.
sample_malware.txt)
This is a Test file
"Test Test Test"
yara을 사용하여 스캔하면 해당 Rule 절이 표시됩니다.
$ yara sample_text.yar sample_malware.txt
Example_Rule sample_malware.txt
ClamAV 0.99b Meets YARA!
http://blog.clamav.net/2015/06/clamav-099b-meets-yara.html
Regular expressions in both YARA rules and ClamAV logical signatures require the Perl Compatible Regular Expressions (PCRE) library. Please ensure PCRE is installed on your system when configuring ClamAV. ClamAV configuration will automatically look for PCRE in /usr/lib and /usr/local/lib. If you have PCRE installed in a different location, use ‘./configure –with-pcre=DIR’ to specify the resident PCRE directory.
CentOS7에 Redmine을 구축
http://twinbird-htn.hatenablog.com/entry/2016/02/26/203314
우선 계정 만들기
adduser redmine
sudo 설정
# visudo
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
redmine ALL=(ALL) ALL #<- 추기
http를 방화벽에서 허용
[root@localhost ~]# firewall-cmd --zone=public --add-service=http --permanent
success
[root@localhost ~]# firewall-cmd --reload
success
[root@localhost ~]# firewall-cmd --zone=public --list-services
dhcpv6-client http ssh
설치
개발 도구 (C 컴파일러 등의) 설치
[root @ localhost ~] # yum -y groupinstall "Development Tools"
Ruby 와 Passenger 빌드에 필요한 헤더 등의 설치
yum -y install openssl-devel readline-devel zlib-devel curl-devel libyaml-devel libffi-devel
PostgreSQL 와 헤더 파일 설치
yum -y install postgresql-server postgresql-devel
Apache 와 헤더 파일 설치
yum -y install httpd httpd-devel
ImageMagick 와 헤더 파일 일본어 폰트 설치
yum -y install ImageMagick ImageMagick-devel ipa-pgothic-fonts
ruby 를 재 구축 할 필요가 있기 때문에 ruby -devel 패키지를 넣는다
yum -y install ruby-devel
Ruby 를 다운로드하고 빌드 설치
cURL -O https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.gz
tar xvf ruby-2.2.3.tar.gz
CD ruby-2.2.3
./configure --disable-install-doc
make
make install
CD ..
PostgreSQL 설정
postgresql-setup initdb
Redmine 에서 PostgreSQL 에 접속하기위한 설정을 추가
/var/lib/pgsql/data/pg_hba.conf 편집
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local redmine redmine ident
local all all peer
# IPv4 local connections:
host redmine redmine 127.0.0.1/32 md5
host all all 127.0.0.1/32 ident
# IPv6 local connections:
host redmine redmine ::1/128 md5
host all all ::1/128 ident
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 ident
#host replication postgres ::1/128 ident
PostgreSQL 디렉토리로 이동
cd /var/lib/pgsql
Redmine 용 사용자 작성
sudo -u postgres createuser -P redmine
Enter Password for new role : (PostgreSQL redmine 용 사용자 설정 암호를 입력)
Enter it again : (비밀번호 재 입력)
Redmine 데이터베이스 만들기
sudo -u postgres createdb -E UTF-8 -l ja_JP.UTF-8 -O redmine -T template0 redmine
Redmine 설치
svn co http://svn.redmine.org/redmine/branches/3.2-stable /var/lib/redmine
DB 설정
[root@localhost ~]# cd /var/lib/redmine/
[root@localhost redmine]# ls
CONTRIBUTING.md Rakefile bin db files plugins test
Gemfile app config doc lib public tmp
README.rdoc appveyor.yml config.ru extra log script vendor
[root@localhost redmine]# cp config/database.yml.example config/database.yml
[root@localhost redmine]# vi config/database.yml # 다음에 변경
production:
adapter: postgresql
database: redmine
host: localhost
username: redmine
password: [여기에 Postgres의 암호를 입력]
encoding: utf8
Redmine 설치 디렉토리로 이동
cd /var/lib/redmine
gem 패키지 설치 패키지 넣는다
bundle install --without development test --path vendor/bundle
오류가 나온다. 사용할 예정도 없는데 mysql 과 nokogiri가 있다고 말한다. ( ActiveRecord 가 의존하고있는 같다. Redmine 내부에서도 nokogiri 라든지 사용하고있는 건가?)
넣기
yum -y install mysql-devel
yum -y install libxml2-devel
yum -y install libxslt-devel
시스템 라이브러리를 사용하도록 설정
bundle config build.nokogiri --use-system-libraries
세션 변조 방지를위한 비밀 키 의 생성
bundle exec rake generate_secret_token
DB 테이블 생성
RAILS_ENV = production bundle exec rake db : migrate
기본 데이터 등록
RAILS_ENV = production REDMINE_LANG = ja bundle exec rake redmine : load_default_data
Passenger 설치
gem install passenger --no-rdoc --no-ri
Passenger의 Apache 모듈의 설치 (공식적으로는 --auto 옵션을 이용하여 있었지만, 그럼 움직이지 않았다)
passenger-install-apache2-module
화면 지시에 따라 마지막에 다음과 같은 내용이 나타나므로 기록해 둔다.
Please edit your Apache configuration file, and add these lines:
LoadModule passenger_module /usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.25/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.25
PassengerDefaultRuby /usr/local/bin/ruby
Apache 용 설정 내용의 확인
다음 명령을 실행하면 Apache 에 추가해야 설정이 표시됩니다.이 정보는이 후 Apache 설정을 할 때 사용한다. (기록 된 내용과 같은 것)
passenger-install-apache2-module --snippet
출력 결과는 이런 느낌
# passenger-install-apache2-module --snippet
LoadModule passenger_module /usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.25/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.25
PassengerDefaultRuby /usr/local/bin/ruby
Apache 설정
다음 내용으로 / etc / httpd /conf.d/ redmine .conf를 작성하십시오.
# Redmine 이미지 파일 CSS 파일 등에 대한 액세스를 허용하는 설정.
# Apache 2.4의 기본적으로 서버에있는 모든 파일에 대한 액세스가 금지되어있다.
Require all granted
# Passenger 기본 설정.
# passenger-install-apache2-module --snippet에 표시된 설정을 설명
# 환경에 따라 설정 값이 다르기 때문에 다음의 3 행은 그대로 게시하지 않고, 반드시
# passenger-install-apache2-module --snippet 로 표시된 것을 사용한다.
#
LoadModule passenger_module /usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.21/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.21
PassengerDefaultRuby /usr/local/bin/ruby
# Passenger이 추가 HTTP 헤더를 제거하기위한 설정 (선택).
#
Header always unset "X-Powered-By"
Header always unset "X-Runtime"
# 필요한 Passenger 튜닝을위한 설정을 추가 (선택 사항).
# 자세한 내용은 Phusion Passenger users guide(https://www.phusionpassenger.com/library/config/apache/reference/)参照。
PassengerMaxPoolSize 20
PassengerMaxInstancesPerApp 4
PassengerPoolIdleTime 864000
PassengerHighPerformance on
PassengerStatThrottleRate 10
PassengerSpawnMethod smart
PassengerFriendlyErrorPages off
Apache 시작
systemctl start httpd
systemctl enable httpd
Apache 에서 Passenger에서 Redmine 을 실행하기위한 설정
redmine 배치 디렉토리를 읽고 쓸 수 있도록 권한 변경
chown -R apache:apache /var/lib/redmine
httpd .conf 편집
DocumentRoot "/var/www/html"
↓
DocumentRoot "/var/lib/redmine/public"
스크립트 의 내용은 다음과 같다
backup.sh
BACKUP_TIME=`date '+%Y%m%d%I%M%S'`
BACKUPS_DIR=/home/redmine/backups
DIR_PATH_BASE=${BACKUPS_DIR}/${BACKUP_TIME}
rm -rf $BACKUPS_DIR
mkdir -p $DIR_PATH_BASE/files
mkdir -p $DIR_PATH_BASE/db_dump
cp -ra /var/lib/redmine/files/* $DIR_PATH_BASE/files/
/usr/bin/pg_dump -U redmine -Fc --file=$DIR_PATH_BASE/db_dump/redmine.dump redmine
cd ${BACKUPS_DIR}
tar zcvf ${BACKUP_TIME}_redmine_backup.tar.gz $BACKUP_TIME
mkdir -p ${BACKUPS_DIR}/for_transport/
cp -a ${BACKUP_TIME}_redmine_backup.tar.gz ${BACKUPS_DIR}/for_transport/
ftp -n < /home/redmine/backup-script/ftptransport.bat
ftptransport.bat
open [대상 FTP 서버의 IP]
user [FTP 서버의 ID] [password]
bin
prompt
cd [대상 FTP 서버의 디렉토리] # 원격에서 cd로 이동
lcd /home/redmine/backups/for_transport/ # 로컬 cd로 이동
put *
bye
cron을 설정
crontab -e
mailto = "hogehoge@fugafuga.jp"
55 23 * * * /home/redmine/backup-script/backup.sh
복원은 다음에있는 것 같다. 사실 DB는 예시 않은 왠지 미안 해요.
# Postgres
pg_restore -C -d postgres redmine
# Files restore
cp -ar backupdate/files/* /var/lib/redmine/files
Redmine AD SSO setup
http://blog.techutils.space/2016/02/redmine-ad-sso-setup.html
HowTo configure a single sign-on into Redmine from an other App on the same server
https://redmine.org/projects/redmine/wiki/HowTo_configure_a_single_sign-on_into_Redmine_from_an_other_App_on_the_same_server
Configure the use of autologin cookie also in config/configuraion.yml
autologin_cookie_name: autologin
autologin_cookie_path: /
autologin_cookie_secure: false
Create cookie with autologin token
This will be specific to your App but here's the syntax for PHP using above generated sha1 with a validity of 4 hours:
setcookie('autologin', '4277e87755e03ca3ad3b343ede51971dec52852b', time()+60*60*4, '/', '.yourdomain.be');
WordPress wp_remote_post() sending informaiton to Redmine REST API
http://wordpress.stackexchange.com/questions/142929/wordpress-wp-remote-post-sending-informaiton-to-redmine-rest-api
Authentication
Most of the time, the API requires authentication. To enable the API-style authentication, you have to check Enable REST API in Administration -> Settings -> Authentication. Then, authentication can be done in 2 different ways:
using your regular login/password via HTTP Basic authentication.
using your API key which is a handy way to avoid putting a password in a script. The API key may be attached to each request in one of the following way:
passed in as a "key" parameter
passed in as a username with a random password via HTTP Basic authentication
passed in as a "X-Redmine-API-Key" HTTP header (added in Redmine 1.1.0)
You can find your API key on your account page ( /my/account ) when logged in, on the right-hand pane of the default layout.
PostgreSQL의 백업 방법 요약
http://qiita.com/bwtakacy/items/65260e29a25b5fbde835
Spark에서 PostgreSQL 데이터를 처리
http://qiita.com/bwtakacy/items/1c8b6d341a086f038398
PostgreSQL 9.5 の新機能
http://www.slideshare.net/syachi/postgresql-95-57673885
Redmine을 설치 한 후해야 할 일
http://kengo700.hatenablog.com/entry/2016/02/14/Redmine_%E3%82%92%E3%82%BB%E3%83%83%E3%83%88%E3%82%A2%E3%83%83%E3%83%97%E3%81%97%E3%81%9F%E5%BE%8C%E3%81%AB%E3%82%84%E3%82%8B%E3%81%B9%E3%81%8D%E3%81%93%E3%81%A8
Redmine 티켓 데이터를 Redmine 외부의 BI 도구로 표현하는 아이디어
http://forza.cocolog-nifty.com/blog/2016/03/redmineredmineb.html
Redmine 티켓이 완료되면 진행 속도와 날짜를 자동으로 업데이트 플러그인 redmine_issue_completion
http://forza.cocolog-nifty.com/blog/2016/03/redmineredmine_.html
티켓 구동 개발의 실천과 함께
http://kntmr.hatenablog.com/entry/2016/02/28/214000?_ga=1.56230507.1109802141.1457439798
REDMINE 2016/2/26 발표자료
http://www.slideshare.net/g_maeda/redmine-58804869
Redmine Issue Import script
http://forum.kimai.org/index.php?topic=751.0
#! /usr/bin/perl
use warnings;
use strict;
use DBI;
# the url to your redmine page which shows the issues (can be a project page, or the "all issues" page)
my $redmineUrl = "https://your.redmine.url/projects/project_name/";
# the redmine autologin cookie, you need this for script access to redmine
my $autoLogin = "f41e8d8a8c42d17551774579b867d636856aae97";
# your redmine filter id
my $filterID = 13;
# the kimai group id which the task should be assigned to (1 is mostly the admin group)
my $groupID = 1;
# database credentials from kimai
my ($database, $username, $password) = ("database", "username", "password");
qx#rm issues.csv#;
qx#wget -q --no-check-certificate --header="Cookie: autologin=$autoLogin" $redmineUrl/issues.csv?query_id=$filterID -O issues.csv#;
if(! -f 'issues.csv') {
die("Failed to download issues");
}
my %projectHash;
my $dbh = DBI->connect("DBI:mysql:$database", $username, $password)
or die("Cannot establish connection to mysql server: $DBI::errstr\n");
# Get all project from database
my $sth = $dbh->prepare("SELECT `pct_ID`, `pct_name` FROM `pct`");
$sth->execute();
while(my @row = $sth->fetchrow_array()) {
$projectHash{$row[1]} = $row[0];
}
# Create filter if not exists
if(! -f 'filter.txt') {
qx#touch filter.txt#;
}
# Add filters to an array
my @filter;
open FILTER, '<', 'filter.txt';
while() {
push @filter, $_;
}
close FILTER;
open FILTER, '+>', 'filter.txt';
open FILE, '<', "issues.csv";
while() {
# skip the first line in export file
next if $_ =~ /^#;/;
# the whole filter. Gets the row you want, its *very* likely that you need to modifcy this for your export rows. Just add parantesis around the row - .*? - which you need
# the rows in the exportfile depend on the filter you set up in redmine
# for example, my export rows look like this (german version of redmine but i think you get the point):
# #;Status;Projekt;Tracker;Priorität;Thema;Zugewiesen an;Kategorie;Zielversion;Autor;Beginn;Abgabedatum;% erledigt;Geschätzter Aufwand;Angelegt;Aktualisiert;Angebot in h;Auftrag erhalten;Beschreibung
if(/^(.*?);.*?;(.*?);.*?;(.*?);(.*?);.*?;(.*?);.*?;(.*?);.*?;.*?;.*?;.*?;(.*?)/) {
my ($issue, $project, $priority, $topic, $category, $author, $creationDate) = ($1, $2, $3, $4, $5, $6, $7);
# skip if already imported
print "skipping $issue\n" and next if grep /$issue/, @filter;
# strip formatting quote which are used by redmine and replace them by plaintext quotes
$topic =~ s/(^"|"$)//g;
$topic =~ s/""/"/g;
# only import if the project of the issue exists as a project in kimai (needs to be exact the same spelling!)
my $pctId;
if($pctId = $projectHash{$project} or $pctId = $projectHash{$category}) {
# insert task into the task table
my $query = "INSERT INTO `evt` SET `evt_name` = CONCAT('#', ?, ': ', ?), `evt_comment` = CONCAT('Created By ', ?, ', Priority: ', ?)";
$sth = $dbh->prepare($query);
$sth->execute($issue, $topic, $author, $priority) or die("failed to execute query: $query\n");
# assign tasks to a group
$query = "INSERT INTO `grp_evt` SET `grp_ID` = ?, `evt_ID` = ?";
my $insertId = $dbh->last_insert_id(undef, undef, undef, undef);
$sth = $dbh->prepare($query);
$sth->execute($groupID, $insertId) or die("failed to execute query: $query\n");
# finally assign tasks to a project
$query = "INSERT INTO `pct_evt` SET `evt_ID` = ?, `pct_ID` = ?";
$sth = $dbh->prepare($query);
$sth->execute($insertId, $pctId) or die("failed to execute query: $query\n");
# add the issue to our filter file for not having duplicates
print FILTER "$issue\n";
}
}
}
close FILTER;
close FILE;
Redmine API: Testing for the Authentication Key
http://www.freelancingdigest.com/articles/redmine-api-testing-for-the-authentication-key/
HTTP Basic auth – http://login:password@redmine.org/issues.xml
-HTTP Basic auth with API token and login – http://login:RANDOM_KEY@redmine.org/issues.xml– (not supported yet)
HTTP Basic auth with API token – http://RANDOM_KEY:X@redmine.org/issues.xml
Full token auth – http://redmine.org/issues.xml?key=RANDOM_KEY
LDAP Authentication
http://www.redmine.org/projects/redmine/wiki/RedmineLDAP
IT 개발자 충원 관련건
요구 경력 : 웹기반 업무시스템 개발 경력 5년 이상
부트스트랩, Jquery 가능
MySQL, Postgresql, MSSQL 기반
현재 연구단에 구축된 업무시스템의 유지보수 및 추가 개발