Learn Linux Notes

Source: Internet
Author: User

Recently I have just written and shared experiences and methods in my blog. The following are some of the problems and methods I found in my previous studies, which are now posted for your reference.

    1. The configuration file for modifying DNS is in:/etc/resolv.conf, no command: nameserver8.8.8.8

    2. IP profile in: CentOS system in:/etc/sysconfig/network-scripts/eth0, Ubuntu system is in/etc/network/ interfaces. After modifying a configuration file with VI, it is permanently useful, with ifconfig eth0 192.16.1.1 netmask 255.255.255.0, which is not used after reboot

    3. The commands for viewing Linux versions of commands and kernel information are: Lsb_release–a and Uname–a

    1. Modify user password: passwd user name


  1. Starting the network and disabling the network under Centos 7 This command is useless: Ifconfigeth0 up/down. To use this command: Ifup/ifdown eth0

  2. View Run Level: RunLevel

  3. See the application specific installation information: RPM–QA app name. such as Apache. Is this: Rpm-qa httpd.

  4. Centos 7 under Apache. There are two ways of booting: Service httpd start or Systemctl starthttpd.service. Set boot up: Systemctl enable Httpd.service. Firewall boot: Service iptables start/restart/stop, or Systemctlstat iptables.service. View Status: Service iptables status.

  5. To view disk partitions: df–h/l/a

  6. See if the application is started: Service app name (httpd, iptables) status.

  7. Available when viewing relevant application-related permissions in SELinux: Getsebool-a|grep FTP or SESTATUS–B |grep FTP

    Setup with: Setsebool-p allow_ftpd_anon_write on where-p is a permanent setting and is also useful after a reboot.

12, close the SELinux command: [/usr/sbin/]setenforce 0, restart failure; long-term shutdown needs to be modified: vi/etc/selinux/conf
Set selinux=disabled takes effect after reboot. To view the SELinux status command:

Getenforce or Sestatus

13, install Semanage method: First to find the name of the installation package, you can use the command: Yum provides/usr/sbin/semanage

Then install: Yum Install Policycoreutils-python

Add other port methods such as http: semanage port–a–thttp_port_t-p TCP port number (e.g. 8090);

View pre-defined commands: Semanage port-l |grep What services (such as HTTP)

14, Apache pop-up error: Starting httpd:httpd:Could not reliably determine the server ' s fully qualifieddomain name, using Localho St.localdomain for ServerName

Workaround: Add such a sentence under the configuration file under/etc/httpd/conf/:

ServerName localhost[: Port number (port number accessed)]

XV, Tomcat set the boot automatically method:

Vi/etc/rc.d/rc.local

2. After opening, copy below at the bottom
Export jdk_home=/usr/java/jdk1.6.0_41
Export java_home=/usr/java/jdk1.6.0_41
/var/apache-tomcat/bin/startup.sh

3, restart the server, try to access.

Tips:
0, if the JDK and Tomcat installed directory is not the same as above, please modify the corresponding path

16, view the installation version information: such as mysql-server. Command: Rpm–qi mysql-server


17, to see if a service is booting, you can use: Chkconfig--list |grep service name (such as httpd, mysqld), or chkconfig--list service name (this service name must be the same as the server's process name). If the boot does not start, you can use this command to add boot: Chkconfig service name on.


18, install Linux will certainly involve the partition, when we do operations in a company, it is best to have planning, such as all the same version of the Linux system partition the same number of blocks. Common partitions are as follows:

/boot 200M

/80G

Swap 16G (The book is said not to exceed 2G, this can be operated on their own to try)

/data the rest.

We first partition, then format, and then mount the partition.

This article is from the "technology is Strength" blog, please be sure to keep this source http://dclcit.blog.51cto.com/7905236/1607171

Learning Linux Notes

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.