免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
Linux 配置與管理基本命令

假設(shè)你想在本地(本地IP:192.168.0.1)運(yùn)行192.168.0.2的X應(yīng)用程序,首先在本地xhost + 192.168.0.2,允許192.168.0.2連接本地的X Server(xhost的具體用法man xhost),然后登錄到192.168.0.2上,export DISPLAY=192.168.0.1:0。然后就可以在本地使用192.168.0.2的X應(yīng)用程序了。

遠(yuǎn)程桌面

使用VNC。VNC既有Linux版,也有Windows版,所以就可以互相啟動(dòng)遠(yuǎn)程桌面了。

假設(shè)在本地192.168.0.1上遠(yuǎn)程使用192.168.0.2的桌面,兩臺(tái)機(jī)器上都裝上VNC。

首先在192.168.0.2上,vncpasswd設(shè)置登錄密碼。然后啟動(dòng)vncserver(不需要root權(quán)限,每個(gè)用戶可以啟動(dòng)自己的 server),記住端口號(hào)(這兒是192.168.0.2:1)。修改$HOME/.vnc/xstartup文件,注釋掉所有行,在最后加上一行 startkde &,就可以使用KDE桌面了。當(dāng)然可以使用其它窗口管理器,默認(rèn)是twm。

在192.168.0.1上,執(zhí)行vncviewer 192.168.0.2:1,就可以了。

關(guān)閉vncserver:vncserver -kill :1 (1是display number, man vncserver)

安裝.src.rpm

有些軟件包是以.src.rpm結(jié)尾的,這類軟件包是包含了源代碼的rpm包,在安裝時(shí)需要進(jìn)行編譯。這類軟件包有兩種安裝方法:

方法一:

1. 執(zhí)行rpm -i your-package.src.rpm

2. cd /usr/src/redhat/SPECS

3. rpmbuild -bp your-package.specs 一個(gè)和你的軟件包同名的specs文件

4. cd /usr/src/redhat/BUILD/your-package/ 一個(gè)和你的軟件包同名的目錄

5. ./configure 這一步和編譯普通的源碼軟件一樣,可以加上參數(shù)

6. make

7. make install

方法二:

1. 執(zhí)行rpm -i you-package.src.rpm

2. cd /usr/src/redhat/SPECS (前兩步和方法一相同)

3. rpmbuild -bb your-package.specs 一個(gè)和你的軟件包同名的specs文件

這時(shí),在/usr/src/redhat/RPM/i386/ (根據(jù)具體包的不同,也可能是i686,noarch等等) 在這個(gè)目錄下,有一個(gè)新的rpm包,這個(gè)是編譯好的二進(jìn)制文件。執(zhí)行:rpm -i new-package.rpm即可安裝完成。

 
方法三:
 
1。 執(zhí)行rpmbuild --rebuild your-package.src.rpm來直接把源代碼rpm包編譯成普通的二進(jìn)制rpm包。執(zhí)行上述命令之后,可以到/usr/src/redhat/RPMS/i386目錄種找到可用的二進(jìn)制RPM包。
 
2。 在/usr/src/redhat/RPMS/i386中安裝二進(jìn)制RPM包。

HTTP服務(wù)器

用戶主頁設(shè)置

(from httpd.conf)

The name of the directory that is appended onto a user‘s home directory if a ~user request is received.

The path to the end user account ‘public_html‘ directory must be accessible to the webserver userid. This usually means that ~userid must have permissions of 711, ~userid/public_html must have permissions of 755, and documents contained therein must be world-readable. Otherwise, the client will only receive a "403 Forbidden" message.

不過首先需要將允許用戶主頁設(shè)置的UserDir選項(xiàng)打開。

USB設(shè)備

連接上USB存儲(chǔ)設(shè)備后,首先執(zhí)行 fdisk -l /dev/sda,如果能看到sda1,sda2等分區(qū)的信息,則說明分區(qū)識(shí)別成功,按照普通分區(qū)mount即可;mount -o iocharset=gb2312,umask=0 /dev/sda /mnt/usb, 解決中文顯示問題,其他用戶可寫。

如果重復(fù)使用兩種USB設(shè)備,則第二個(gè)設(shè)備應(yīng)為/dev/sdb。

分區(qū)和創(chuàng)建文件系統(tǒng)

一次具體操作過程: (創(chuàng)建新分區(qū)和新文件系統(tǒng),并將/home掛載到該分區(qū)上)

/sbin/fdisk /dev/sda分區(qū);

/sbin/mkfs -t ext3 /dev/sda7創(chuàng)建文件系統(tǒng)(作用類似于windows下的format)

修改/etc/fstab,將/home mount到該分區(qū)上

/sbin/fdisk /dev/sdb分區(qū);

/sbin/mkfs -t ext3 /dev/sdb2創(chuàng)建文件系統(tǒng)(作用類似于windows下的format)

修改/etc/fstab,將/misc mount到該分區(qū)上

mount -t vfat /dev/hda1 /mnt/disk_c

Mount

fat32的分區(qū):mount -o codepage=936,iocharset=cp936 /dev/hda7 /mnt/cdrom

ntfs分區(qū)用上述方法可顯示部分中文,2.6內(nèi)核需要用nls=cp936參數(shù)

iso文件 :mount -o loop /abc.iso /mnt/cdrom

軟盤 :mount /dev/fd0 /mnt/floppy

USB閃存 :mount /dev/sda1 /mnt/cdrom

所有/etc/fstab內(nèi)容 mount -a

注:mount時(shí)可以指定文件格式"-t 格式", 格式可以為vfat, ext2, ext3等.

SSH登錄不用輸密碼的方法

首先生成dsa的密鑰對:ssh-keygen -t dsa

輸出:
Generating public/private dsa key pair.
Enter file in which to save the key (/home/sj/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/sj/.ssh/id_dsa.
Your public key has been saved in /home/sj/.ssh/id_dsa.pub.
The key fingerprint is:
1b:8c:3d:6d:eb:e3:10:c3:b7:c0:68:a3:5f:7e:b3:51 sj@192.168.0.1

然后把其中的公鑰加入到遠(yuǎn)程機(jī)器的.ssh/authorized_keys文件中。如果authorized_keys文件不存在,直接將公鑰復(fù)制即可,比如: scp .ssh/id_dsa.pub 192.168.0.2:.ssh/authorized_keys。

還有ssh-agent的方法,暫無研究。

rsync

可以用于備份文件。

我用這個(gè)把我的主頁定期更新到服務(wù)器,如:

rsync -e ssh -av --delete ~/WiKi/publish net:~/

cron

cron可以用來建立能夠按照指定的時(shí)間或時(shí)間間隔定期執(zhí)行的作業(yè)。所以如果你想要定期讓計(jì)算機(jī)干什么,就需要這個(gè)工具了。

每個(gè)用戶使用crontab -e的命令來編輯你自己的crontab文件,文件中每一行是一個(gè)你要運(yùn)行的作業(yè),格式如下:

minute  hour  dayofmonth  month  dayofweek  command

minute: 從0到59之間的一個(gè)值
hour: 從0到23之間的一個(gè)值
dayofmonth: 從1到31之間的一個(gè)值
month: 從1到12之間的一個(gè)值
dayofweek: 從0到6之間的一個(gè)值(0表示星期天)
command: 在指定時(shí)間執(zhí)行的命令
(上面的日期和時(shí)間域中可以使用*號(hào),表示該域?yàn)閠rue)

舉例:
0 1 * * * echo "It is 1 am"
將會(huì)使得crontab的文件的所有者在每天1點(diǎn)接收到一個(gè)電子郵件,如果不想用郵件,可以把命令的輸出重定向的文件。

Squid

配置HTTP代理服務(wù)器,參考文檔。

- Starting Squid -

After you‘ve finished editing the configuration file, you can start
Squid for the first time. First, you must create the swap directories.
Do this by running Squid with the -z option:

/usr/local/squid/sbin/squid -z

Once that completes, you can start Squid and try it out. Probably the
best thing to do is run it from your terminal and watch the debugging
output. Use this command:

/usr/local/squid/sbin/squid -NCd1

If everything is working okay, then your console displays: "Ready to
serve requests".

If you want to run squid in the background, as a daemon process, just
leave off all options:

/usr/local/squid/sbin/squid

Here depending on your configuration, you may need to start squid as root.

TIPS

修改系統(tǒng)時(shí)間:

date -s 11:10:00 +"%T" 或者 date --set=11:10:00 +"%T"
修改主機(jī)名:

uname可以查詢主機(jī)信息,hostname可以修改主機(jī)名;

修改/etc/sysconfig/network,將HOSTNAME一行改為HOSTNAME=主機(jī)名,重啟后也能生效;

在終端下輸入hostname <nop>YourNewHostname,也能暫時(shí)生效;但是重起后失效。
一些配置文件:

/etc/sysctl.conf:可以關(guān)閉ping等;

/etc/inittab:修改運(yùn)行級別,運(yùn)行級別3時(shí)系統(tǒng)進(jìn)入命令行模式,運(yùn)行級別5時(shí)系統(tǒng)進(jìn)入圖形化界面;

/etc/xinetd.d:修改相應(yīng)服務(wù)的disable參數(shù),可以關(guān)閉或打開相應(yīng)服務(wù);
ssh和sftp指定端口:

sftp -oPort=2000 lop
ssh -p 2000 lop
添加新的library路徑:

after modify /etc/ld.so.conf, run /sbin/ldconfig to update the dynamic loader cache.

or set environment variable: LD_LIBRARY_PATH
查看系統(tǒng)版本:

cat /proc/version to see kernel version and distribution
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
Oracle 11g數(shù)據(jù)庫RAC安裝手冊(上)
Squid安裝
Varnish 緩存服務(wù)器配置
squid使用
Oracle 11g R2 RAC ASM OracleLinux6.4安裝詳解(圖)
Oracle RAC
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服