Sharing of common instructions in PHP development

小云云
Release: 2023-03-21 12:28:01
Original
1534 people have browsed it

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”
Copy after login


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 //把本地库的所有内容推送到远程库上
Copy after login

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
Copy after login

2. Write the system time to the hardware time

# hwclock --systohc
Copy after login

1. Open and run the contents of this file first:

vim /etc/rc.local
Copy after login


//Similar constructor
2.apache’s so-called www directory

/usr/local/apache2/htdocs
Copy after login


3.apache main configuration

/usr/local/apache2/etc/httpd.conf
Copy after login


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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!