顯示具有 opensuse實作 標籤的文章。 顯示所有文章
顯示具有 opensuse實作 標籤的文章。 顯示所有文章

2014年11月8日 星期六

opensuse13.1 vftp setup

# vi /etc/vsftpd.conf


write_enable=YES

dirmessage_enable=YES

nopriv_user=ftpsecure

local_enable=YES

local_umask=022

chroot_local_user=YES

chroot_list_enable=YES

chroot_list_file=/etc/vsftpd.chroot_list

vi /etc/vsftpd.chroot_list
參考你的 /etc/passwd 設定檔, 然後將 UID 小於 500 的帳號名稱給他同時寫到這個檔案內吧!一行一個帳號!(參考至鳥哥的 Linux 私房菜)(creat users account..one line,one user)

anonymous_enable=YES

anon_world_readable_only=YES

syslog_enable=YES

connect_from_port_20=YES

ascii_upload_enable=YES

pam_service_name=vsftpd

listen=NO

listen_ipv6=NO

ssl_enable=NO

pasv_min_port=30000

pasv_max_port=30100

# sudo rcvsftpd restart






 
 



2014年10月24日 星期五

opensuse 11.3 update opensuse11.4

#zypper repos --uri

install the latest upfates:

#zypper refresh

#zypper update

Now that the latest updates are installed, disable all OpenSUSE 11.3 repositories...

#zypper modifyrepo --all --disable

and enable the OpenSUSE 11.4 repositories:

#zypper addrepo --name "openSUSE-11.4 OSS" http://download.opensuse.org/distribution/11.4/repo/oss/ repo-11.4-oss
#zypper addrepo --name "openSUSE-11.4 Non-OSS" http://download.opensuse.org/distribution/11.4/repo/non-oss/ repo-11.4-non-oss
#zypper addrepo --name "openSUSE-11.4 Updates" http://download.opensuse.org/update/11.4/ repo-11.4-update

Now run the full distribution upgrade:

#zypper ref

#zypper dup

#reboot

2013年10月2日 星期三

opensuse ssh遠端連線實作設定

# vi /etc/ssh/sshd_config

Port 22

Protocol 2

PermitRootLogin yes

PubkeyAuthentication yes

PermitEmptyPasswords no

UsePAM yes

X11Forwarding yes

TCPKeepAlive yes

# /etc/init.d/sshd start
# netstat -tlupn |grep ssh

(參考至鳥哥的 Linux 私房菜)

opensuse vsftp 實作設定

# vi /etc/vsftpd.conf


write_enable=YES

dirmessage_enable=YES

nopriv_user=ftpsecure

local_enable=YES

local_umask=022

chroot_local_user=YES

chroot_list_enable=YES

參考你的 /etc/passwd 設定檔, 然後將 UID 小於 500 的帳號名稱給他同時寫到這個檔案內吧!一行一個帳號!(參考至鳥哥的 Linux 私房菜)

chroot_list_file=/etc/vsftpd.chroot_list

anonymous_enable=YES

anon_world_readable_only=YES

syslog_enable=YES

connect_from_port_20=YES

ascii_upload_enable=YES

pam_service_name=vsftpd

listen_ipv6=NO

ssl_enable=NO

pasv_min_port=30000

pasv_max_port=30100

# /etc/init.d/vsftpd start

# useradd -m anna ==>建立一位叫anna的使用者.連同家目錄

#echo "qwe123456" |passwd --stdin anna  ==>將anna的密碼改為qwe123456

#cat /etc/passwd
#cat /etc/shadow

2013年9月29日 星期日

VI文字編輯器

VI文字編輯器:
命令模式
*練習游標移動
M <畫面中間>
L <畫面底端>
H <畫面頂端>
G <檔案尾>
1G/gg <檔案首>
20G <第20行>
h <游標向左>
j <游標向下>
k <游標向上>
l <游標向右>
請按i或insert鍵按鍵<進入插入模式>
按ESC鍵退出插入模式,進入命令模式
shift+: 進入命令模式
:w!寫
:q!離開
:wq!儲存且離開
u <undo 復原>
p <貼上>
dd <刪除>
5dd <刪除5 行>
yy <複製>
3yy <複製3 行>
可以vi /etc/vimrc 做設定
*相關設定
:syntax on <開啟語法檢查>
:set nu <顯示行號>
:set nonu <不顯示行號>
:set ic <不區分大小寫>
:set noic <區分大小寫>
:set hlsearch <高亮度搜尋>
:set nohlsearch <取消高亮度搜尋>
:set backspace=2 <啟用 backspace>
*取代練習:
在命令列下輸入:
:%s/httpd.conf/http.bak/gc <%搜尋全部, s 取代, g 全部取代, c 確認>

install mysql+apache2+phpMyadmin on opensuse

#su - root

#輸入密碼以root身分登入,使用終端機

#進入yast2 啟動xinetd服務

#yast2 -i mysql mysql-client

#chkconfig  mysql  --list

#/etc/init.d/mysql start

#mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQLSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!In order to log into MySQL to secure it, we’ll need the currentpassword for the root user. If you’ve just installed MySQL, andyou haven’t set the root password yet, the password will be blank,so you should just press enter here.Enter current password for root (enter for none): <- ENTER

OK, successfully used password, moving on…Setting the root password ensures that nobody can log into the MySQLroot user without the proper authorisation.

Set root password? [Y/n] <- Y

New password: <- 輸入MySQL root password

Re-enter new password: <- 再確認root password

Password updated successfully!

Reloading privilege tables..

…Success!

By default, a MySQL installation has an anonymous user, allowing anyoneto log into MySQL without having to have a user account created forthem. This is intended only for testing, and to make the installationgo a bit smoother. You should remove them before moving into aproduction environment.Remove anonymous users? [Y/n] <- Y

…Success!

Normally, root should only be allowed to connect from ‘localhost’. Thisensures that someone cannot guess at the root password from the network.Disallow root login remotely? [Y/n] <- Y

…Success!

By default, MySQL comes with a database named ‘test’ that anyone canaccess. This is also intended only for testing, and should be removedbefore moving into a production environment.

Remove test database and access to it? [Y/n] <- Y

- Dropping test database…… Success!- Removing privileges on test database…

… Success!

Reloading the privilege tables will ensure that all changes made so farwill take effect immediately.Reload privilege tables now? [Y/n] <- Y

… Success!

Cleaning up…All done! If you’ve completed all of the above steps, your MySQLinstallation should now be secure.Thanks for using MySQL!

#yast2 -i apache2

#chkconfig  apache2 --list

#/etc/init.d/apache2 start

#若無法順利啟動,按電腦的install/remove software修正apache2

#yast2 -i apache2-mod_php5

#/etc/init.d/apache2 restart

#vi /srv/www/htdocs/info.php



<?php

phpinfo();

?>

#yast2 -i php5-mysql php5-bcmath php5-bz2 php5-calendar php5-ctype php5-curl php5-dom php5-ftp php5-gd php5-gettext php5-gmp php5-iconv php5-imap php5-ldap php5-mbstring php5-mcrypt php5-odbc php5-openssl php5-pcntl php5-pgsql php5-posix php5-shmop php5-snmp php5-soap php5-sockets php5-sqlite php5-sysvsem php5-tokenizer php5-wddx php5-xmlrpc php5-xsl php5-zlib php5-exif php5-fastcgi php5-pear php5-sysvmsg php5-sysvshm

#/etc/init.d/apache2 restart

#cd /srv/www/htdocs

#wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.5.8.2/phpMyAdmin-3.5.8.2-all-languages.tar.gz/download#!md5!040ef1264a9b0b07dcaa2bb0cce7aa72

#tar zxvf phpMyAdmin-3.5.8.2-all-languages.tar.gz -C /srv/www/htdocs/

#mv phpMyAdmin-3.5.8.2-all-languages phpmyadmin




















#若出現

























#/etc/init.d/mysql restart 

#測試用root登入