A summary of the management of Linux system in the notes of Brother Yun-Wan (I.)

Source: Internet
Author: User
Tags install openssl openssl nameserver fully qualified domain name

Question One,

Create a new user Xuetong, with the user login error is as follows:

[Email protected] ~]# Su-xuetong

Id:cannot find name for user ID 504

Id:cannot find name for group ID 504

Id:cannot find name for user ID 504

[I have no [email protected] ~]$

And show I have no name!

Resolution: Due to the/etc/passwd and/etc/group two file permissions (600) is not caused by the

Change the permissions of the passwd and group files to 644.

chmod 644/etc/passwd

chmod 644/etc/group


Question Two,

Install KVM virtual machine under linux command line

#virt-install--name mem1--HVM--ram 2048--vcpus 2--disk path=/opt/vms/os_11.img,size=10--network network:default--ac Celerate--vnc--vncport=5911--vnclisten=0.0.0.0--os-variant rhel6--cdrom/root/centos-6.3-x86_64-minimal-efi.iso- D

Error: QEMU-KVM:-drive file=/root/centos-6.3-x86_64-minimal-efi.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly= On,format=raw:could not open disk image/root/centos-6.3-x86_64-minimal-efi.iso:permission denied

Resolution: Resolution: VIM/ETC/LIBVIRT/QEMU.CONF

# Some Examples of valid values are:

#

# user = "Qemu" # A user named "Qemu"

# user = "+0" # Super User (Uid=0)

# user = "+" # a user named "or a user with uid=100

user = "Root" (remove user before #)

# The group for QEMU processes run by the system instance. It can be

# specified in a similar-to user.

Group = "Root" (remove group before #)

# Whether Libvirt should dynamically change file ownership

# to match the configured User/group above. Defaults to 1.

# Set to 0 to disable file ownership changes.

dynamic_ownership = 0 (remove before dynamic_ownership #)


Problem three, installing a KVM virtual machine from a Xshell remote connection to a Linux host

Error: Cannot open display:

Run ' Virt-viewer--help ' to see a full list of the available command line options

Fri, Sep 18:24:50 DEBUG Domain after install:1

Domain installation still in progress. Can reconnect to

The console to complete the installation process.

Resolution: Connect a Linux host via VNC, IP address +vnc port number (virtual machine-enabled VNC port number), log on to the virtual machine to install the Linux operating system.


Issue four, install Apache

Error: Configure:error:Cannot use a external APR with the bundled Apr-util

Error: Checking for APR ... configure:error:the--with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.

Resolution: Requires the installation of APR and Apr-util


Install Apr

# CD SRCLIB/APR

#./configure--PREFIX=/USR/LOCAL/APR

Error: Onfigure:error:in '/USR/LOCAL/HTTPD-2.2.27/SRCLIB/APR ':

Configure:error:no acceptable C compiler found in $PATH

See ' Config.log ' for more details

FIX: Install GCC dependency package yum-y install GCC

Make && make install, error:

-bash:make:command not found

FIX: Install make package yum-y install make


Installing Apr-util

# CD: /apr-util/

#./configure--prefix=/usr/local/apr-util--WITH-APR=/USR/LOCAL/APR

# make

# make Install


Installing Apache

./configure--prefix=/usr/local/apache--enable-deflate--enable-headers--enable-mime-magic--enable-proxy-- Enable-ssl=static--enable-so--enable-rewrite--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util-- With-mpm=prefork--with-ssl=/usr/local/ssl/include--enable-mods-shared=all

Error:

Checking whether to enable Mod_deflate ... configure:error:mod_deflate have been requested but can not is built due to pre Requisite failures


FIX: Install Zlib-devel

Yum Install Zlib-devel


Error: No SSL-C headers found

Configure:error: ... No recognized SSL/TLS toolkit detected

FIX: Install openssl-devel yum installed Openssl-devel



Start Apache/usr/local/apache/bin/apachectl Start

Error: Httpd:could not reliably determine the server ' s fully qualified domain name, using Localhost.localdomain for Servernam E

FIX: Change host names in ServerName and/etc/hosts files in/usr/local/apache/bin/http.conf


Install Apr

# CD SRCLIB/APR

#./configure--PREFIX=/USR/LOCAL/APR

# make

# make Install

Installing Apr-util

# CD: /apr-util/

#./configure--prefix=/usr/local/apr-util--WITH-APR=/USR/LOCAL/APR

# make

# make Install

# CD: /.. /

To load a global variable:

echo "Export ld_library_path= $LD _library_path:/usr/local/apr/lib" >>/etc/profile

Source/etc/profile

Installing Apache

#cd httpd-2.2.21

Yum Install Zlib-devel

./configure--prefix=/usr/local/apache--enable-deflate--enable-headers--enable-mime-magic--enable-proxy-- Enable-ssl=static--enable-so--enable-rewrite--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util-- With-mpm=prefork--with-ssl=/usr/local/ssl/include--enable-mods-shared=all

#make && make Install


#netstat-an | GREP:80//See if the linux80 port is turned on


Question Five

Install Hudson Error: Open http://192.168.1.81:8081/hudson/error Error

WORKAROUND: The Java version and the Hudson version must be guaranteed to match. If the Java version is low, an error will be provided.


#ServerName Www.example.com:@@[email protected]@

Listen @@[email protected]@


Question Six

Install Java error:

[Email protected] java]# java-version

Java Version "1.5.0"

Gij (GNU libgcj) version 4.4.7 20120313 (Red Hat 4.4.7-4)


Copyright (C) Free Software Foundation, Inc.

This was free software;  See the source for copying conditions. There is NO

Warranty Not even to merchantability or FITNESS for A particular PURPOSE.


Solve:

[Email protected] bin]# rm-f java

[Email protected] usr]# ln-s/usr/java/jdk1.6.0_26/bin/java/usr/bin/java


[Email protected] usr]# java-version

Error occurred during initialization of VMS

Java/lang/noclassdeffounderror:java/lang/object

Workaround:

Entry directory:/usr/java/jdk/lib

Unzip the Tools.pack to Tools.jar:

unpack200 Tools.pack Tools.jar

Entry directory:/usr/java/jdk/jre/lib

Unzip the Rt.pack to Rt.jar:

unpack200 Rt.pack Rt.jar


Question Seven

Yum Error When:

[Email protected] local]# yum-y install wget

Loaded Plugins:fastestmirror, Presto

Could not retrieve mirrorlist Http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was

14:pycurl ERROR 6-"couldn ' t resolve Host ' mirrorlist.centos.org '"

Error:cannot Retrieve repository metadata (Repomd.xml) for repository:base. Verify its path and try again

Error:cannot find a valid baseurl for repo:base error

The workaround is as follows (modify DNS configuration)

Vi/etc/resolv.conf

Last added nameserver 8.8.8.8 in this file

If no VI editor is available

echo "NameServer 8.8.8.8" >>/etc/resolv.conf


Change host Name:

Vi/etc/sysconfig/network modifying hostname

Hostname=vm85.bc.com

Vi/etc/hosts

127.0.0.1 vm85.bc.com

Reboot (must restart the computer)


This article from "Tong Brother's operation and maintenance notes" blog, declined reproduced!

A summary of the management of Linux system in the notes of Brother Yun-Wan (I.)

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.