Linux Common Tips

Source: Internet
Author: User


First, set the fixed IP address
1.config See which NIC is used
This is supposed to be eth1.
2. Modify the DNS address
Vim/etc/resolv.conf
Search domain Address
NameServer 192.168.3.2 #主dns地址
NameServer 14.114.114.114 #次dns地址
3 Modify Ifcfg-eth1 File
Vim/etc/sysconfig/network-scripts/ifcfg-eth1
The next few items that must be set
Device=eth1
ipaddr=192.168.3.128
netmask=255.255.255.0 #子网掩码
gateway=192.168.3.2 #网关地址
Onboot=yes #引导时是否激活设备
Bootroto=static #设置ip地址为静态
dns1=192.168.3.2
4. Restart the NIC
Service Network

Second, add the command path to the $path variable
1. Modify the profile file
Vim/etc/profile
In the last line, add the PHP command line directory path modified to:
Export path= "$PATH:/usr/local/bin:/data/local/php/bin"
2. Make the file changes effective immediately
Source/etc/profile
So we can use it directly.
Php-v to see the PHP version.

Third, set up a soft link to achieve direct use of the command
1. If the Luajit installation path is
/usr/local/bin/luajit-2.1.0-beta1
View version can be
/usr/local/bin/luajit-2.1.0-beta1-v
2. Now create a soft link to execute directly from a command
Note: It is important to note that if you want to execute the command directly, you must create the/bin directory under the root directory to
The specific actions are:
Ln/usr/local/bin/luajit-2.1.0-beta1/bin/luajit
Luajit-v can also view the version, can be directly operated

Linux Common Tips

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.