![]() |
Tạo site wordpress chạy nhanh nhanh bằng Easy Engine |
ee site create mysite.org --hhvm --pagespeed --wpredis
--pagespeed | |
--hhvm | |
Page Cache | --wpredis |
![]() |
Tạo site wordpress chạy nhanh nhanh bằng Easy Engine |
--pagespeed | |
--hhvm | |
Page Cache | --wpredis |
![]() |
Cài đặt Nginx trên Ubuntu để dùng Phalcon |
#Tải mới phiên bản Ubuntu
apt-get update && apt-get upgrade
#Cài đặt nginx
apt-get install nginx
#Cài đặt Mysql
apt-get install mariadb-server mariadb-client
#Cài đặt bảo mật cho mysql
mysql_secure_installation
#Cài đặt php và extension để bun được phalcon
apt-get install php5-fpm php5-mysql php5-dev php5
#Di chuyển đến nơi chứa thư mục mặt định của web
cd /usr/share/nginx/html
#Nếu bước này không thực hiện thì sẽ không build được phalcon
apt-get install git-core gcc autoconf make libpcre3-dev
#Di chuyển đến thư mục ~ Home
cd ~
#Tạo Swap Ram để cài đặt phalcon nhanh hơn
dd if=/dev/zero of=/swapfile bs=2048 count=1024k
mkswap /swapfile
chmod 600 /swapfile
chown root:root /swapfile
swapon /swapfile
#Kiểm Tra
free -m
#Xoá cache trên ram thật và ram ảo
echo 3 > /proc/sys/vm/drop_caches
#Tải framework phalcon về thưc mục Home
git clone git://github.com/phalcon/cphalcon.git
cd cphalcon/build/
./install
#Tạo thêm file phalcon.ini
cd /etc/php5/mods-available/
nano phalcon.ini
cd ..
#Chép qua thư mục cli nữa
cd cli/
#Đây là câu lệnh tạo file shortcut
ln -s /etc/php5/mods-available/phalcon.ini .
#Chép qua thư mục conf.d
cd conf.d/
ln -s /etc/php5/mods-available/phalcon.ini .
#Chép qua thưc mục fpm
cd fpm/
ln -s /etc/php5/mods-available/phalcon.ini .
cd conf.d/
ln -s /etc/php5/mods-available/phalcon.ini .
#Khởi động lại php
service php5-fpm restart
#Tạo thêm file config
cd /etc/nginx/sites-available/
#Copy thêm mới 1 file từ file cũ
cp default phalcon.demo
#Mở lên bằng nano
nano phalcon.demo
service nginx reload
nano phalcon.demo
#Di chuyển đến html thư mục
cd /usr/share/nginx/html/
#Tạo thư mục phalcon.demo để chứa source
mkdir phalcon.demo
#Sau đó bỏ 1 file html tuỳ ý vào
#Tạo shortcut cho tệp tin config để nginx reload được
/etc/nginx/sites-available/phalcon.demo /etc/nginx/sites-enabled/
service nginx reload
#Cài đặt phalcon Dev
clone https://github.com/phalcon/phalcon-devtools.git
git clone https://github.com/phalcon/phalcon-devtools.git
/opt/phalcon-devtools/
![]() |
Chỉnh Phalcon khi dùng Nginx trên Ubuntu 14.02 |
![]() |
Tập tin được tải lên có dung lượng vượt quá hạn mức quy định bởi cài đặt upload_max_filesize trong tập tin php.ini. |
![]() |
Mẫu tin nhắn gởi cho khách hàng bằng tiếng Anh |
![]() |
Cách tạo Swap Ram ảo cho VPS Ubuntu |
![]() |
Lệnh xoá bộ nhớ tạm cho Ram Linux |
![]() |
Cài đặt và cấu hình tài khoản FTP cho VPS Cloud Ubuntu |
### Install FTP Account
##http://unix.stackexchange.com/questions/83221/how-to-create-a-ftp-user-with-specific-dir-access-only-on-a-centos-linux-ins #www-data
passwd www-data
nano /etc/passwd www-data:x:33:33:www-data:/var/www:/bin/bash
nano /etc/ssh/sshd_config
#PasswordAuthentication yes
service ssh restart
#newuser
adduser leon
passwd leon
chown -R leonnguyen /folder
usermod -d /folder/ leon
![]() |
Cấu hình thư mục chứa tệp tin của web-server Apache cho VPS Ubuntu |
![]() |
Cách sử dụng Git cho Bitbucket - Lệnh cơ bản |
git clone https://username@bitbucket.org/username/folk_name.git
git remote add upstream https://username@bitbucket.org/docom/name.git
git remote -v
git pull upstream master
git config --global user.name "username"
git config --global user.email youraccount@gmail.com
git add --all
git commit -m 'about'
git push
git pull upstream master
git status
git reset HEAD~1
Step 1: Open Port in Server
22/TCP (Inbound/Outbound) : Standard SSH port
80/TCP (Inbound/Outbound) : Standard HTTP port
443/TCP(Inbound/Outbound) : Standard HTTPS port
22222/TCP (Inboud) : To access EasyEngine admin tools
11371/TCP (Outbound) : To connect to GPG Key Server
Step 2: Connect Server
ssh -i leonnguyen.pem ubuntu@54.254.134.128
Step 3: Update Ubuntu && Install EE
wget -qO ee rt.cx/ee && sudo bash ee # install easyengine
sudo ee site create example.com --wp # install wordpress on example.com
## https://easyengine.io/docs/commands/stack/
# Install web packages
ee stack install
#Clean NGINX FastCGI cache, Opcacache, Memcache
ee clean --all
#Create site
ee site create nameweb --wpfc --pagespeed --user=admin --pass=alo123
##https://easyengine.io/docs/commands/secure/
#Changing HTTP authentication credentials
ee secure --auth [Optional user name] [Optional password]
#Changing Admin Port
ee secure --port [Optional port no]
# Disable cache config file
#
# include common/wpfc.conf;
include common/php.conf;