Home > Article > Backend Development > Sharing of common instructions in PHP development
This article mainly shares with you the commonly used instructions in PHP development. We first share with you the configuration of the git environment, hoping to help you.
Configure git environment configuration:
git config –global user.name "Hoewang" git config -global user.email "37407409@qq.com" $ ssh-keygen -t rsa -C “37407409@qq.com”
Github side: settings->ssh keys->Enter the contents of the id_rsa.pub file (via cd ~/ .ssh) View files
Common project interaction:
git init //把这个目录变成Git可以管理的仓库 git add README.md //文件添加到仓库 git add . //不但可以跟单一文件,还可以跟通配符,更可以跟目录。一个点就把当前目录下所有未追踪的文件全部add了 git commit -m "first commit" //把文件提交到仓库 git remote add origin git@github.com:Hoewang/practice.git //关联远程仓库 git push -u origin master //把本地库的所有内容推送到远程库上
Changed:
1.git status
2. Add modified files to the index library (git add - u)
3. Check again (git status)
4. Submit the modification from the staging area to the local repository (git commit -m "modify")
5. Get the latest version from the remote and merge To local (git pull)
6. Push the branch of the local repository to the corresponding branch on the remote server (git push)
Enable memcache:
/usr/local/memcache/bin/memcached -umemcache &
Linux:
Set system time:
date -s 10/10/17 Set date
date -s 09:54:00 Set time
1. Set system time and network time Synchronization
# ntpdate cn.pool.ntp.org
2. Write the system time to the hardware time
# hwclock --systohc
1. Open and run the contents of this file first:
vim /etc/rc.local
//Similar constructor
2.apache’s so-called www directory
/usr/local/apache2/htdocs
3.apache main configuration
/usr/local/apache2/etc/httpd.conf
4 .apache sub-configuration
/usr/local/apache2/etc/extra/httpd-vhosts.conf
5. Operation alias
vim /root/.bashrc
alias sta='/usr/ local/apache2/bin/apachectl start'
alias sto='/usr/local/apache2/bin/apachectl stop'
source /root/.bashrc //Load this configuration
6.php configuration
/usr/local/php/etc/php.ini
7. Add environment variables
vim /etc/profile
Add export PATH="/usr/local/php/ to the last line bin:$PATH"
export PATH="/usr/local/mysql/bin:$PATH"
source /etc/profile
Firewall:
iptables -F
iptables -X
Iptables -Z
Detection query:
1. Restart the server service network restart
2. Check whether apache starts netstat –tlunp | grep 80
3. Check whether mysql starts netstat –tlunp | grep 3306
4. Detect remote netstat – tlunp | grep 22
The above is the detailed content of Sharing of common instructions in PHP development. For more information, please follow other related articles on the PHP Chinese website!