-
-
Save robinbastien/6482447 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mysql -u root -p | |
| mysql> create user blog@localhost identified by 'password'; | |
| mysql> create database blog; | |
| mysql> grant all on blog.* to blog@localhost; | |
| mysql> exit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| useradd -d /home/blog -m blog | |
| passwd blog |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo vim /etc/init.d/php-fastcgi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| BIND=127.0.0.1:9000 | |
| USER=www-data | |
| PHP_FCGI_CHILDREN=15 | |
| PHP_FCGI_MAX_REQUESTS=1000 | |
| PHP_CGI=/usr/bin/php-cgi | |
| PHP_CGI_NAME=`basename $PHP_CGI` | |
| PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND" | |
| RETVAL=0 | |
| start() { | |
| echo -n "Starting PHP FastCGI: " | |
| start-stop-daemon --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- $PHP_CGI_ARGS | |
| RETVAL=$? | |
| echo "$PHP_CGI_NAME." | |
| } | |
| stop() { | |
| echo -n "Stopping PHP FastCGI: " | |
| killall -q -w -u $USER $PHP_CGI | |
| RETVAL=$? | |
| echo "$PHP_CGI_NAME." | |
| } | |
| case "$1" in | |
| start) | |
| start | |
| ;; | |
| stop) | |
| stop | |
| ;; | |
| restart) | |
| stop | |
| start | |
| ;; | |
| *) | |
| echo "Usage: php-fastcgi {start|stop|restart}" | |
| exit 1 | |
| ;; | |
| esac | |
| exit $RETVAL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo chmod +x /etc/init.d/php-fastcgi | |
| sudo service php-fastcgi start | |
| sudo update-rc.d php-fastcgi defaults |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mkdir tmp | |
| cd tmp && wget http://wordpress.org/latest.zip && unzip latest.zip | |
| sudo mv wordpress /var/www/ | |
| sudo chown -R blog:blog /var/www/wordpress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install nginx mysql-server-5.1 php5-cgi php5-mysql phpmyadmin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| scp your_public_key.pub blog@your_linode_ip:~/.ssh/authorized_keys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| visudo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| blog ALL=(ALL) ALL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment