Ubuntu 上安装 pptp
[ 2010/12/02 14:57 | by Totti ]
1.首先到 /dev/ 和 /dev/net/ 下确认是否有 ppp 和 tun 两个设备
/dev/ppp
/dev/net/tun
2.安装 pptpd
apt-get install pptpd
/dev/ppp
/dev/net/tun
2.安装 pptpd
apt-get install pptpd
Windows 7 电脑做 Wi-Fi 基站
[ 2010/10/21 08:39 | by Totti ]
1、用管理员模式启动命令行提示符,然后输入
netsh wlan set hostednetwork mode=allow ssid=Hotspot key=passwordhere
2、用以下命令启动基站功能
netsh wlan start hostednetwork
运行完命令以后,您可以在Windows7的控制面板中的网络和共享设置里面看到一个“Microsoft Virtual WiFi Miniport Adapter”设备。
netsh wlan set hostednetwork mode=allow ssid=Hotspot key=passwordhere
2、用以下命令启动基站功能
netsh wlan start hostednetwork
运行完命令以后,您可以在Windows7的控制面板中的网络和共享设置里面看到一个“Microsoft Virtual WiFi Miniport Adapter”设备。
BO-BLOG批量删除留言
[ 2010/10/05 11:35 | by Totti ]
以下语句是删除回复ID大于等于60的留言,注意查看你的正常留言的ID是多少:
在PHPMYADMIN里面的SQL执行:
delete FROM `boblog_messages`
WHERE `repid` >=60
在PHPMYADMIN里面的SQL执行:
delete FROM `boblog_messages`
WHERE `repid` >=60
无权限 SSH 账户创建方法
[ 2010/10/01 22:13 | by Totti ]
方法如下:
首先写一段shell
代码:
#!/bin/sh
echo ""
echo " ********************************************************************"
echo " * welcome to http://bmforum.com- SSH Tunnel , press a key to exit. *"
echo " ********************************************************************"
echo ""
read x
exit
保存为: /bin/tunnel.sh
代码:
chmod 755 /bin/tunnel.sh #加权限
useradd tunnel -g nobody -s /bin/tunnel.sh #加用户
passwd tunnel #给他个密码。
更新:Ubuntu下没有nobody组,请改为nogroup
删除账户使用命令
userdel [-r][用户帐号]
userdel可删除用户帐号与相关的文件。若不加参数,则仅删除用户帐号,而不删除相关文件。
-f 删除用户登入目录以及目录中所有文件。
首先写一段shell
代码:
#!/bin/sh
echo ""
echo " ********************************************************************"
echo " * welcome to http://bmforum.com- SSH Tunnel , press a key to exit. *"
echo " ********************************************************************"
echo ""
read x
exit
保存为: /bin/tunnel.sh
代码:
chmod 755 /bin/tunnel.sh #加权限
useradd tunnel -g nobody -s /bin/tunnel.sh #加用户
passwd tunnel #给他个密码。
更新:Ubuntu下没有nobody组,请改为nogroup
删除账户使用命令
userdel [-r][用户帐号]
userdel可删除用户帐号与相关的文件。若不加参数,则仅删除用户帐号,而不删除相关文件。
-f 删除用户登入目录以及目录中所有文件。
Install Transmission on CentOS
[ 2010/10/01 13:07 | by Totti ]
I often use Transmission as my torrent client on my MacBook, so I tried to install it on my VPS. Downloading torrents on your VPS have many benefits. You will be seeding from your VPS instead of your home computer, so your home internet connection will not be slowed. You will also be able to start the torrent on the VPS at night, and download it in the morning. Anyways, here’s the direction to install Transmission on CentOS.
Install the Necessary Packages
Building Transmission requires the following packages, so you will need to download it from the yum repository.
gcc
cURL
libevent
intltool
gettext
yum install gcc curl curl-devel libevent libevent-devel intltool gettext
Download and Extract Transmission
The latest version of Transmission as of writing is 2.03. You can always grab the link to the latest version on Transmission’s download page. Note that the file name of the latest version may differ.
wget http://mirrors.m0k.org/transmission/files/transmission-2.03.tar.bz2Extract the package now:
tar -xvf transmission-2.03.tar.bz2Installing Transmission
To begin the installation, go inside the Transmission folder:
cd transmission-2.03Here’s the fun part. You’re going to run the configure script and make! Afterwards, you’ll just run make install and you’ll be done!
./configure -q && make -s
make install
Conclusion
Congratulations! You have successfully installed Transmission! Now, run the following command to view Transmission’s help guide:
transmissioncli -hI prefer Transmission over the variety of torrent clients, since Transmission uses much less memory and CPU that many others, and has a simple installation process. In a few days, I will go over the process of setting up Transmission’s web interface.
Install the Necessary Packages
Building Transmission requires the following packages, so you will need to download it from the yum repository.
gcc
cURL
libevent
intltool
gettext
yum install gcc curl curl-devel libevent libevent-devel intltool gettext
Download and Extract Transmission
The latest version of Transmission as of writing is 2.03. You can always grab the link to the latest version on Transmission’s download page. Note that the file name of the latest version may differ.
wget http://mirrors.m0k.org/transmission/files/transmission-2.03.tar.bz2Extract the package now:
tar -xvf transmission-2.03.tar.bz2Installing Transmission
To begin the installation, go inside the Transmission folder:
cd transmission-2.03Here’s the fun part. You’re going to run the configure script and make! Afterwards, you’ll just run make install and you’ll be done!
./configure -q && make -s
make install
Conclusion
Congratulations! You have successfully installed Transmission! Now, run the following command to view Transmission’s help guide:
transmissioncli -hI prefer Transmission over the variety of torrent clients, since Transmission uses much less memory and CPU that many others, and has a simple installation process. In a few days, I will go over the process of setting up Transmission’s web interface.
查看CentOS版本方法
[ 2010/09/26 14:48 | by Totti ]
有以下命令可以查看:
# lsb_release -a
LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description: CentOS release 5.5 (Final)
Release: 5.5
Codename: Final
这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
[root@us ~]# uname
Linux
[root@us ~]# uname -a
Linux 2.6.18-194.11.4.el5 #1 SMP Tue Sep 21 05:04:09 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
以下二种方法适用于RedHat,CentOS
[root@us ~]# cat /etc/redhat-release
CentOS release 5.5 (Final)
# lsb_release -a
LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description: CentOS release 5.5 (Final)
Release: 5.5
Codename: Final
这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
[root@us ~]# uname
Linux
[root@us ~]# uname -a
Linux 2.6.18-194.11.4.el5 #1 SMP Tue Sep 21 05:04:09 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
以下二种方法适用于RedHat,CentOS
[root@us ~]# cat /etc/redhat-release
CentOS release 5.5 (Final)
discuz7.2在firefox下安全提问的输入框出不来的解决方案
[ 2010/08/26 21:58 | by Totti ]
用记事本等编辑器打开include/js/common.js 找到
BROWSER.firefox = document.getBoxObjectFor && USERAGENT.indexOf('firefox') != -1 && USERAGENT.substr(USERAGENT.indexOf('firefox') + 8, 3);
中的
document.getBoxObjectFor &&
将其去掉,保存回去,然后到后台更新缓存。
BROWSER.firefox = document.getBoxObjectFor && USERAGENT.indexOf('firefox') != -1 && USERAGENT.substr(USERAGENT.indexOf('firefox') + 8, 3);
中的
document.getBoxObjectFor &&
将其去掉,保存回去,然后到后台更新缓存。