2014년 7월 31일 목요일
mysql tips
* 사용자 추가
CREATE DATABASE databasename;
CREATE USER 'userid'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON databasename.* TO 'userid'@'%';
CREATE USER 'userid'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON databasename.* TO 'userid'@'localhost';
flush privileges;
* table의 DB engine 변경
alter table s3board type=innodb;
2014년 7월 16일 수요일
Install Redmine on Ubuntu 12.04 LTS (with MyLyn and Eclipse plugins)
http://ioriy2k.pe.kr/archives/4762
$ sudo apt-get install tasksel
$ sudo tasksel install lamp-server
$ sudo add-apt-repository ppa:ondrej/redmine
$ sudo apt-get update
$ sudo apt-get install redmine redmine-mysql
$ sudo ln -s /usr/share/redmine/public /var/www/redmine
$ sudo apt-get remove libapache2-mod-passenger
$ sudo gem install passenger
$ sudo apt-get install libcurl4-openssl-dev libssl-dev zlib1g-dev apache2-prefork-dev libapr1-dev libaprutil1-dev
$ sudo passenger-install-apache2-module
* 빌드후 다음과 같은 메세지가 출력되면 메모
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-4.0.46/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /var/lib/gems/1.8/gems/passenger-4.0.46
PassengerDefaultRuby /usr/bin/ruby1.8
</IfModule>
$ sudo vi /etc/apache2/mods-available/passenger.load
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-4.0.46/buildout/apache2/mod_passenger.so
$ sudo vi /etc/apache2/mods-available/passenger.conf
<IfModule mod_passenger.c>
PassengerRoot /var/lib/gems/1.8/gems/passenger-4.0.46
PassengerDefaultRuby /usr/bin/ruby1.8
PassengerDefaultUser www-data
</IfModule>
$ sudo vi /etc/apache2/sites-available/default
<Directory /var/www/redmine>
RailsBaseURI /redmine
PassengerResolveSymlinksInDocumentRoot on
</Directory>
$ sudo a2enmod passenger
$ sudo service apache2 restart
$ sudo ufw allow 80
http://ioriy2k.pe.kr/archives/4843
$ sudo apt-get install git-core ruby-git
$ cd /usr/share/redmine
$ sudo ruby script/plugin install --force git://redmin-mylyncon.git.sourceforge.net/gitroot/redmin-mylyncon/redmine-mylyn-connector
$ sudo service apache2 restart
$ sudo apt-get install tasksel
$ sudo tasksel install lamp-server
$ sudo add-apt-repository ppa:ondrej/redmine
$ sudo apt-get update
$ sudo apt-get install redmine redmine-mysql
$ sudo ln -s /usr/share/redmine/public /var/www/redmine
$ sudo apt-get remove libapache2-mod-passenger
$ sudo gem install passenger
$ sudo apt-get install libcurl4-openssl-dev libssl-dev zlib1g-dev apache2-prefork-dev libapr1-dev libaprutil1-dev
$ sudo passenger-install-apache2-module
* 빌드후 다음과 같은 메세지가 출력되면 메모
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-4.0.46/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /var/lib/gems/1.8/gems/passenger-4.0.46
PassengerDefaultRuby /usr/bin/ruby1.8
</IfModule>
$ sudo vi /etc/apache2/mods-available/passenger.load
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-4.0.46/buildout/apache2/mod_passenger.so
$ sudo vi /etc/apache2/mods-available/passenger.conf
<IfModule mod_passenger.c>
PassengerRoot /var/lib/gems/1.8/gems/passenger-4.0.46
PassengerDefaultRuby /usr/bin/ruby1.8
PassengerDefaultUser www-data
</IfModule>
$ sudo vi /etc/apache2/sites-available/default
<Directory /var/www/redmine>
RailsBaseURI /redmine
PassengerResolveSymlinksInDocumentRoot on
</Directory>
$ sudo a2enmod passenger
$ sudo service apache2 restart
$ sudo ufw allow 80
http://ioriy2k.pe.kr/archives/4843
$ sudo apt-get install git-core ruby-git
$ cd /usr/share/redmine
$ sudo ruby script/plugin install --force git://redmin-mylyncon.git.sourceforge.net/gitroot/redmin-mylyncon/redmine-mylyn-connector
$ sudo service apache2 restart
2014년 7월 3일 목요일
Subversion 특정 날짜동안 변경된 목록 조회
svn diff --username <userid> --password <password> <svn_url> --summarize -r {2014-06-20}:{2014-07-02} > log.txt
2014년 7월 2일 수요일
[cloudv] Installing Jenkins on Ubuntu
sudo apt-get install openjdk-7-jdk
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
* start jenkins service
sudo service jenkins start
* Change Jenkins HTTP Port
sudo vi /etc/default/jenkins
HTTP_PORT=<port>
* Open firewall using ufw
sudo ufw allow <port>
---
* set post scripts for deploy
$ sudo passwd jenkins
$ sudo vi /etc/sudoers
Defaults:jenkins !requiretty
jenkins ALL = NOPASSWD: /var/lib/jenkins/post_scripts/deploy_myapp.sh
$ sudo su - jenkins
jenkins$ mkdir /var/lib/jenkins/post_scripts
jenkins$ vi /var/lib/jenkins/post_scripts/deploy_myapp.sh
service tomcat6 stop
rm -rf /var/lib/tomcat6/webapps/huyang/
service tomcat6 start
http://localhost:8080/job/<myapp>/configure
Post Steps > Execute shell > Command
sudo /var/lib/jenkins/post_scripts/deploy_myapp.sh
피드 구독하기:
글 (Atom)