Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------------------------------------------------------------------------------------------
- SETTING SYSTEM
- apt--get update
- apt--get install vim
- rm --f /usr/bin/vi
- ln --s /usr/bin/vim /usr/bin/vi
- echo --e 'syntax on\nset number' > .vimrc
- echo --e 'deb http://packages.dotdeb.org jessie all\ndeb--src http://packages.dotdeb.org jessie all\ndeb [arch=amd64,i386] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/debian jessie main' >> /etc/apt/sources.list
- wget http://www.dotdeb.org/dotdeb.gpg
- apt--key add dotdeb.gpg
- apt--get install python--software--properties --y
- apt--key adv ----recv--keys ----keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
- apt--get update && apt--get upgrade --y
- rm --f dotdeb.gpg
- ----------------------------------------------------------------------------------------------------
- SETTING PHP (lebih tepatnya PHP5--FPM)
- apt--get install php5--fpm php5--mysqlnd php5--gd php5--curl --y
- sed --i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/php5/fpm/php.ini
- sed --i 's/upload_max_filesize = 2M/upload_max_filesize = 50M/' /etc/php5/fpm/php.ini
- ------------------------------------------------------------------------------------------------------
- SETTING MARIA DB
- apt--get install mariadb--server --y
- mysql_secure_installation
- N, Y, Y, Y, Y
- --------------------------------------------------------------------------------------------------------
- Setting Nginx
- apt--get install nginx --y
- sed --i '/http {/a \\tclient_max_body_size 100m;' /etc/nginx/nginx.conf
- vi /etc/nginx/sites--available/example.com
- server {
- listen 80;
- server_name www.example.com;
- return 301 http://example.com$request_uri;
- }
- server {
- listen 80;
- root /var/www/html/example.com;
- index index.html index.htm index.php;
- access_log /var/log/nginx/example.com.access.log;
- error_log /var/log/nginx/example.com.error.log;
- server_name example.com;
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass unix:/var/run/php5--fpm.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- location ~ /\.ht {
- deny all;
- }
- }
- ----------------------------------------------------------------------------------------------------------------------
- ln --s /etc/nginx/sites--available/example.com /etc/nginx/sites--enabled/
- service nginx restart
- service mysql restart
- service php5--fpm restart
- ------------------------------------------------------------------------------------------------------------------------
- SETTING DATA BASE
- mysql --u root --p
- --------------------------------------------------------------------------------------------------------------------------
- CREATE DATABASE db_example;
- CREATE USER 'u_example'@'localhost' IDENTIFIED BY 'password';
- GRANT ALL PRIVILEGES ON db_example.* TO 'u_example'@'localhost';
- flush privileges;
- quit;
- --------------------------------------------------------------------------------------------------------------------------
- ----------------------------------------------------------------------------------------------------------------------------
- INSTALL WORDPRESS DI VPS LINUX DEBIAN
- wget https://wordpress.org/latest.tar.gz
- tar --xf latest.tar.gz
- rm --f latest.tar.gz
- mv wordpress example.com
- mv example.com /var/www/html/
- chown --R www--data:www--data /var/www/html/example.com
- ----------------------------------------------------------------------------------------------------------------------------
- MENAMBAH DOMAIN
- cp /etc/nginx/sites-available/default /etc/nginx/sites-available/example.org.block
- vi /etc/nginx/sites-available/example.org.block
- ln -s /etc/nginx/sites-available/example.org.block /etc/nginx/sites-enabled/
- service nginx reload
- mkdir -p /var/www/html/example.org
- service mysql restart
- service php5--fpm restart
- mysql --u root --p
- --------------------------------------------------------------------------------------------------------------------------
- CREATE DATABASE db_example;
- CREATE USER 'u_example'@'localhost' IDENTIFIED BY 'password';
- GRANT ALL PRIVILEGES ON db_example.* TO 'u_example'@'localhost';
- flush privileges;
- quit;
- --------------------------------------------------------------------------------------------------------------------------
- INSTALL WORDPRESS DI VPS LINUX DEBIAN
- wget https://wordpress.org/latest.tar.gz
- tar --xf latest.tar.gz
- rm --f latest.tar.gz
- mv wordpress example.com
- mv example.com /var/www/html/
- chown --R www--data:www--data /var/www/html/example.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement