add php gd (graphics directly) support in ubuntu
#sudo apt-get install php5-gd
then, restart web service
#sudo service lighttpd restart //or #sudo service apache2 restart
add php gd (graphics directly) support in ubuntu
#sudo apt-get install php5-gd
then, restart web service
#sudo service lighttpd restart //or #sudo service apache2 restart
open root account in ubuntu:
$sudo passwd root
then, set new password for root.
using python get friend timeline in twitter. following tools should be used:
python-simplejson
first install python-simplejson, if in ubuntu, just using command as follows
$apt-get install python-simplejson
then, downloading python-twitter , unpackage it. then using command
$ python setup.py build $ python setup.py install
then, open python.
>>> import twitter
>>> api = twitter.Api(“username”, “passworld”)
>>> posts = api.GetFriendsTimeline(‘username’)
>>> print [post.text in post as posts ];
for the file, the script should be liked:
import twitter
class mytwitter():
def __init__(self):
self._config = None
def main():
api = twitter.Api('username', 'passworld')
posts = api.GetFriendsTimeline('username')
for post in posts:
print post.text.encode('utf-8')
if __name__ == "__main__":
main()
first look kubuntu.
the most bugs of KDE have been fixed. the wifi mod has been improved. the package library adds many new software, like monodevelop2 firefox 3.1 and 3.5, kooldock, etc. but I didn’t see katapult.
To mount the ISO image file.iso to the mount point /mnt/test use this command:
mount -o loop -t iso9660 file.iso /mnt/test
building a PXE boot server in the ubuntu.
1. install dhcp3 server in the ubuntu.
apt-get install dhcp3-server
2. edit /etc/default/dhcp3-server
INTERFACES=”eth0″
3. edit /etc/dhcp3/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.example";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}
4. edit /etc/network/interfaces
auto eth0:1
iface eth0:1 inet static
name DHCPserver
address 192.168.1.1
netmask 255.255.255.0
5. restart networking and dhcp3
service networking restart
service dhcp3-server restart
clean ubuntu package cache:
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove
clean isolated package
sudo apt-get install deborphan -y
I love packages manage of ubuntu. it make everything easy. example of install and upgrade. Don’t worry about relationship of different package. adept manager will help you to do that.