Tag Info

Hot answers tagged

174

There are no benefits that I can discern for using CentOS (or RHEL) over Ubuntu if you are equally familiar with using both OSes. We use RHEL and CentOS heavily at work, and it's just painful -- we're building custom packages left and right because the OS doesn't come with them, and paid RedHat support is worse than useless, being chock full of "pillars of ...


85

Something like this should do the trick: JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")


71

Installing PHP 5.4.* on Ubuntu 12.04 Simply add the PPA repository: sudo add-apt-repository ppa:ondrej/php5-oldstable And install it: sudo apt-get update sudo apt-get install php5 You may need to install add-apt-repository on Ubuntu 12.04. To do so, run the command: sudo apt-get install python-software-properties NB! For latest version of PHP ...


63

I'll share my experiences working as a technologist in a few different fields... (Caution: this is a story about Red Hat... and how I grew up professionally with it) I started working with Linux professionally in 2000-2002. This was during the wide adoption of Red Hat and the Red Hat Professional Editions (6.x, 7.x, 8.0). These were available for free ...


60

Based on the date displayed by your version of OpenSSL, it seems you are seeing the full version displayed there. Open SSL 1.0.1 was released on March 14th, 2012. 1.0.1a was released on April 19th of 2012. So, I'm going to go ahead and assert that openssl version -a is the proper, cross-distro way to display the full version of OpenSSL that's installed on ...


53

Check for the presence of /var/run/reboot-required.


51

There are actually three ways you can do this: the right way, the wrong way, and the ugly way. First, create a normal user account. adduser username Then select one of the following: The Right Way Create a sudo entry for the wheel group in /etc/sudoers like this: ## Allows people in group wheel to run all commands %wheel ALL=(ALL) ALL Or ...


50

By default Ubuntu doesn't specify a ServerName in the Apache configuration, because it doesn't know what the name of your server is. It tries a reverse lookup on your IP address, which returns nothing, so it just has to use the IP address as the ServerName. To fix it, either add a ServerName directive outside of any virtual host - e.g. in ...


48

I currently work in an environment that has used Linux for more than a decade. Everybody in the office uses different distros on their desktops as well as the servers. As such, the choices of distribution tend to revolve around a number of things in no particular order: History - Obviously systems like RedHat and Debian have been around for a long time. ...


44

apt-mark can help you: apt-mark auto zlib1g-dev For 11.04 or older, use "markauto" instead of "auto"


43

In the early days of Linux being taken more seriously in the everyday business world there was always a nervousness that followed mention of the name. Tech employees found that "It was started by a university student in his basement" wasn't the best way to sell the idea of an Open Source operating platform to management. The need for a solid company ...


42

'Enterprisey' server deployments are huge projects, with lots of inertia, and admins want to keep them running for many years with only bugfixes. Never new features without a well-rehearsed testing procedure. For this, it's really valuable to have a slow-moving foundation. So that other big and slow-moving projects can be validated on the new version ...


42

First stop your server obviously: sudo service apache2 stop Remove apache2 packages and dependencies: sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common sudo apt-get autoremove --purge If you manually modified or installed stuff, apt might not remove it. Check what's left: whereis apache2 Have a look whats inside these ...


41

The command apt-get upgrade will not add or remove packages. apt-get dist-upgrade will add or remove packages as required. The command apt-get dist-upgrade will not automatically upgrade you from one release to another unless you have also updated your sources (/etc/apt/sources.list) to point at a newer release. man apt-get upgrade upgrade is used to ...


41

You are right, the Ubuntu EC2 EBS images don't come with swap space configured (for 11.04 at least). The "regular" instance-type images do have a swap partition, albeit only 896 MB on the one I tested. If some process blows up and you don't have swap space, your server could come to a crawling halt for a good while before the OOM killer kicks in, whereas ...


40

It's not possible to empty /dev/null, that doesn't make sense. Your friend is joking with you. However it sounds like you don't have apache2 installed. You should be able to install it with sudo aptitude install apache2


40

mulaz's answer is correct, but many people say seq is evil beacuse most shells will let you do the following mkdir {00..99} However in some older versions of bash, 0-9 arent padded, so you would have to do mkdir 0{0..9} {10..99}


39

Short answer: Using visudo, add the following to your sudoers file, replacing username with the proper username: username ALL = /etc/init.d/apache2 If you want to not have to type in a password before you do this, use the following: username ALL = NOPASSWD: /etc/init.d/apache2 After this, the 'username' user can execute sudo /etc/init.d/apache2 ...


37

just run: ssh-add on the client (your pc)


36

.bash_profile and .bashrc are specific to bash, whereas .profile is read by many shells in the absence of their own shell-specific config files. (.profile was used by the original Bourne shell.) .bash_profile or .profile is read by login shells, along with .bashrc; subshells read only .bashrc. (Between job control and modern windowing systems, .bashrc by ...


35

As a more concrete version of Kyle's answer, what you want to put in your ~/.ssh/config file is: host foo User webby ProxyCommand ssh a nc -w 3 %h %p host a User johndoe Then, when you run "ssh foo", SSH will attempt to SSH to johndoe@a, run netcat (nc), then perform an SSH to webby@foo through this tunnel. Magic! Of course, in order to do this, ...


35

The httpd.conf is designed for user configurations. You really should not edit the apache2.conf as it may be updated by future upgrades. An additional option is to just put your custom configuration into /etc/apache2/conf.d, all files in this directory are included as well.


34

I also agree there is a lack of tutorials for people who just need a script to send, e.g. error emails, and don't need a full-blown mail server. First, if postfix not already installed do: sudo apt-get install postfix It prompts with a couple of questions. For the first I chose "Internet site"; for a machine behind a firewall I might choose smarthost ...


34

I don't know about "Ubuntu", but in Linux generally, "iptables" isn't a service - it's a command to manipulate the netfilter kernel firewall. You can "disable" (or stop) the firewall by setting the default policies on all standard chains to "ACCEPT", and flushing the rules. iptables -P INPUT ACCEPT iptables -P OUTPUT ACCEPT iptables -P FORWARD ACCEPT ...


33

Lots of options here: Tools Only If you just want the GNU/Linux tools, there are a few choices. cygwin gives you a bash shell with lots of tools, including an X11 server. This has been around awhile and is mature. msys is a smaller, lightweight alternative to cygwin. GNU utilities for Win32 is another lightweight alternative. These are native versions ...


33

By default, cron will email the owner of the account under which the crontab is running. The system-wide crontab is in /etc/crontab runs under the user `root' Because root is used widely, I'd recommend adding a root alias to your /etc/aliases file anyways. (run 'newaliases' after) The normal way to structure this is for root to be aliased to another user ...


32

Use "netstat" to check the presently using ports. netstat -antp Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 xxx.xxx.xxx.xxx 0.0.0.0:* LISTEN 16297/named tcp 0 0 xxx.xxx.xxx.xxx:53 0.0.0.0:* LISTEN 16297/named tcp 0 0 xxx.xxx.xxx.xxx:53 ...


32

You can do a couple of things for avoiding this First set the variable export DEBIAN_FRONTEND=noninteractive then you can run apt-get -y install [packagename], this should do exactly what you want.


32

Enabling Jumbo Frames means allowing a larger Maximum Transmission Unit (MTU), usually by setting the MTU to 9000. To verify this has worked you can use ping in windows with the -l flag to set the packet size, and the -f flag to set Don't Fragment flag in the packet. ping my.test.host -f -l 8792 If the packet gets fragmented you will see Packet needs to ...


32

Looks like you're not loading the mod_proxy_http module (which is needed to proxy to HTTP servers). I don't have Ubuntu 10.04 in front of me, but IIRC it's something like: sudo a2enmod proxy_http



Only top voted, non community-wiki answers of a minimum length are eligible