顯示包含「debian」標籤的文章。顯示所有文章
顯示包含「debian」標籤的文章。顯示所有文章

2016年7月7日星期四

Debian 8 AMD64 install sopcast

1.enabled i386 software

dpkg --add-architecture i386

2.download libstdc++5 ,

cd /tmp
wget http://www.sopcast.com/download/libstdcpp5.tgz

unzip and move all the files libstdc++5(.01) to usr/lib/


3.download sopcast and sopcast-player

wget http://download.sopcast.com/download/sp-auth.tgz
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/sopcast-player/sopcast-player-0.8.5.tar.gz

If your ISP or country blocked sopcast.com and google code , please use tsocks before wget like

tsocks wget http://download.sopcast.com/download/sp-auth.tgz

or define http(s) proxy in terminal .

4.move sop-auth to usr/bin/

tar -zxvf sp-auth.tgz
mv sp-auth/sp-auth /usr/bin/
rm -r sp-auth/

5.install sopcast-player

apt-get install gettext
tar -zxvf sopcast-player.tar.gz
cd sopcast-player
make
make install
rm -r sopcast-player

the sopcast-player will be showed in application memu.

2016年7月4日星期一

Nodejs app auto start @ Linux

As root user , edit /etc/rc.local in terminal;
command:
nano /etc/rc.local

#!/bin/sh -e
node /home/user/app/app.js
exit 0

save and restart

2016年6月4日星期六

Debian/Ubuntu VPS安裝gfw.press

WARNING:如果你的VPS內存少於512M,請不要嘗試,因為要安裝JDK,會佔用數百兆內存。
1.安裝git下載gfw.press源碼
以下命令全部使用root賬戶。
apt-get install git
git clone https://github.com/chinashiyu/gfw.press.git
2.安裝JDK
理論上安裝jdk7或者8應該都可以。
apt-get install openjdk-8*
或者
apt-get install default-jdk
3.安裝squid3
或者3proxy也可以,但3proxy不在Debian自由軟件庫裡,不知Ubuntu庫裡是否也一樣,請自行嘗試。
apt-get install squid3
如果你的VPS不支持ipv6,請在squid配置文件裡加入下列一行(文件位與/etc/squid3/squid.conf):
dns_v4_first on
然後以下列命令重啟squid3
/etc/init.d/squid3 restart
或者
service squid3 restart
4.修改user.txt,運行gfw.press
修改user.txt,每行一個帳號,格式為端口+空格+密碼,密碼為大小寫和數字,至少
接下來運行gfw.press:
chmod u+x gfw.press/server.sh
gfw.press/server.sh
5.運行客戶端
下載gfw.press客戶端,填入vps ip地址,端口,密碼即可,將你的瀏覽器代理改為127.0.0.1:3128即可。

2016年5月12日星期四

Debian/Ubuntu KVM/Xen Auto Install L2TP/IPsec VPN server

Notice:
This installation can't apply for openvz.

Debian (Jessie or Wheezy) & Ubuntu 12.04-16.04
1.(sudo) apt-get update && apt-get upgrade
2.wget https://git.io/vpnsetup -O vpnsetup.sh
nano -w vpnsetup.sh [Replace with your own values: IPSEC_PSK, VPN_USER and VPN_PASSWORD]
sudo sh vpnsetup.sh
 3.Using your iphone/desktop/Android connect VPN.

2015年9月7日星期一

rinetd共享本機proxy到LAN

        隨著shadowsocks代碼被迫刪除,目前為止最優秀的proxy不再維護,對於常用電腦上網的用戶,使用proxy不是難事,現在依然有很多可用的軟體,比如lantern,JAP proxy,賽風,甚至很久未更新的proxy還可用,對於更喜愛用手機上網的人可能不太方便,但可以使http proxy在電腦端共享給局域網其他的手機和電腦使用,需要用到的軟體就是rinetd,privoxy等。
        rinetd和privoxy使用端口轉發將本機http proxy共享給局域網其他電腦和手機使用。網上有不少privoxy的配置詳解,但對rinetd卻知之甚少,在這裡講述。以下操作系統為Debian 8.
1.安裝
打開terminal,然後su命令輸入root密碼切換到root賬戶,apt-get update && apt-get install rinetd.
2.配置
打開rinetd配置文件,已安裝gnome的可以用gedit代替nano,
nano /etc/rinetd.conf  
#
# this is the configuration file for rinetd, the internet redirection server
#
# you may specify global allow and deny rules here
# only ip addresses are matched, hostnames cannot be specified here
# the wildcards you may use are * and ?
#
# allow 192.168.2.*
# deny 192.168.2.1?


#
# forwarding rules come here
#
# you may specify allow and deny rules after a specific forwarding rule
# to apply to only that forwarding rule
#
# bindadress    bindport  connectaddress  connectport
0.0.0.0 1234 127.0.0.1 10000

# logging information
logfile /var/log/rinetd.log

# uncomment the following line if you want web-server style logfile format
# logcommon
 
藍色字體為字體內容,0.0.0.0:1234表示監聽本機1234端口,你也可以改成你電腦任意未使用的端口,127.0.0.1:10000意思是要轉發的端口也就是本機所使用的http proxy端口。
保存後重啟rinetd
/etc/init.d/rinetd restart
 
windows系統只需上官網下載安裝,配置與上面大同小異。
 
配置成功即可將其他電腦和手機中設置proxy server和端口即可。 

2015年4月22日星期三

讓mediatomb支持中文及各國語言

mediatomb為linux中較為出色的uPnP/DLNA server,很可惜其中的中文文件名往往顯示為亂碼或空格,這裡有辦法讓mediatomb顯示中文。
以下命令行皆為root用戶。
1.修改config.xml文件:
nano /etc/mediatomb/config.xml
在<scripting script-charset="UTF-8">之前加入以下兩段代碼:
<filesystem-charset>UTF-8</filesystem-charset>
<metadata-charset>UTF-8</metadata-charset>
保存退出。

2.重建db
rm /var/lib/mediatomb/mediatomb.db
注:如mediatomb為初始安裝則無db,跳過此步驟即可。

3.重啟mediatomb
/etc/init.d/mediatomb restart

用局域網任一電腦中的firefox打開http://serverip:49152 (serverip替換為你自己的mediatomb server ip),現在添加中文名的mp3或者視頻則可正常顯示了

2015年3月29日星期日

Install xfce and vncserver on Debian

1.Using putty log in to Debian vps.
2.apt-get update
3.apt-get install xorg
4.apt-get install xfce4
5.apt-get install vnc4server
6.apt-get install iceweasel -y
7.start vncserver with commander:
  vncserver
Type password you're going to use twice.
8.kill vncserver with commander:
  vncserver -kill :1
9.nano /root/.vnc/xstartup
This file must be looked like this:
#!bin/sh
/usr/bin/startxfce4 &
10.restart vncserver with commander:
     vncserver
11.log in to vnc using tightvncviewer with serverip:5901 and type your password you've set in step 7.
Done.

2014年2月24日星期一

debian/ubuntu導入goagent和APJP證書

不少大陸朋友使用開源的goagent和APJP翻牆看youtube,facebook,twitter等。
在windows導入證書是很容易的事,直接在瀏覽器導入即可,網上的教程很多,這裡不說了。
而在linux中導入全局證書,當然過程也是很簡單的。
本人使用的是Debian GNU/Linux 7.4,ubuntu的導入也是一樣的。
導入goagent證書:
打開root terminal,進入goagent/local目錄下
輸入以下命令
cp CA.crt /usr/share/ca-certificates/goagent.crt
chmod a+r /usr/share/ca-certificates/goagent.crt
dpkg-reconfigure ca-certificates
在彈出的框中他會問你是否要配置證書,選yes回車,再彈出的下一步中將goagent用空格鍵選中回車即可。

導入APJP證書與goagent證書有一步不一樣:
進入APJP_LOCAL_JAVA目錄下,其中有一個自己生成的APJP_LOCAL_JAVA-1.0.1.pem這個證書,是用JAVA生成的,導入到ca-certificates目錄下時,將文件名直接改成APJP.crt即可。
cp APJP_LOCAL_JAVA-1.0.1.pem /usr/share/ca-certificates/APJP.crt
chmod a+r /usr/share/ca-certificates/APJP.crt
dpkg-reconfigure ca-certificates
在彈出的框中他會問你是否要配置證書,選yes回車,再彈出的下一步中將APJP用空格鍵選中回車即可。

2014年2月17日星期一

解決由sendmail郵件服務器造成的VPS內存佔用過高

情人節當天,由於用phplist群發郵件6萬多封,造成sendmail郵件服務器大量郵件隊列,同時內存佔用達900多M(VPS內存總量1G),開啟webmin圖形管理界面查看進程,一看吓一跳:
全是由sendmail所佔用,平均每個進程佔用約70M。
解決方案如下:
1.清空sendmail郵件隊列:
rm /var/spool/mqueue/*

2.終結所有有sendmail字樣的進程。kill掉

最後內存佔用恢復到300M以下