- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在 Windows 上使用 xampp,但我想使用更接近我的服务器设置的东西。
Federico Cargnelutti tutorial说明如何设置 LAMP VMWARE 设备;这是对 VMware 设备的精彩介绍,但其中一个命令不起作用,并且没有描述如何更改键盘布局和时区。
ps:这些命令很容易找到,但我不想每次重装服务器时都去寻找它们。我用这个问题作为提醒。
最佳答案
这是我的安装脚本,我在 debian 服务器上使用它,但它可以在 Ubuntu 中运行(Ubuntu 是在 Debian 上构建的)
apt-get -yq update
apt-get -yq upgrade
apt-get -yq install sudo
apt-get -yq install gcc
apt-get -yq install g++
apt-get -yq install make
apt-get -yq install apache2
apt-get -yq install php5
apt-get -yq install php5-curl
apt-get -yq install php5-mysql
apt-get -yq install php5-gd
apt-get -yq install mysql-common
apt-get -yq install mysql-client
apt-get -yq install mysql-server
apt-get -yq install phpmyadmin
apt-get -yq install samba
echo '[global]
workgroup = workgroup
server string = %h server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
;invalid users = root
unix password sync = no
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
socket options = TCP_NODELAY
[homes]
comment = Home Directories
browseable = no
writable = no
create mask = 0700
directory mask = 0700
valid users = %S
[www]
comment = WWW
writable = yes
locking = no
path = /var/www
public = yes' > /etc/samba/smb.conf
(echo SAMBAPASSWORD; echo SAMBAPASSWORD) | smbpasswd -sa root
echo 'NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
</VirtualHost>' > /etc/apache2/sites-enabled/000-default
/etc/init.d/apache2 stop
/etc/init.d/samba stop
/etc/init.d/apache2 start
/etc/init.d/samba start
编辑:添加这个来设置你的 MySQL 密码
/etc/init.d/mysql stop
echo "UPDATE mysql.user SET Password=PASSWORD('MySQLPasswrod') WHERE User='root'; FLUSH PRIVILEGES;" > /root/MySQLPassword
mysqld_safe --init-file=/root/MySQLPassword &
sleep 1
/etc/init.d/mysql stop
sleep 1
/etc/init.d/mysql start
结束编辑
这有点特别,但你明白了,如果你把它保存到一个文件(例如“安装”),你所要做的就是:
chmod +x install
./install
我的一些 apt-get 命令不是必需的,因为 apt 会自动获取依赖项,但我更愿意为我的安装提供特定的依赖项。
关于ubuntu - 你如何设置你的LAMP测试服务器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15040/
LAMP 堆栈一词是什么意思? 我在招聘启事中看到过这个引用,但我不完全理解它的含义。 我觉得在我的开发中我相当普遍地使用 LAMP,但是当我听到“stack”时,我觉得我没有像我应该的那样使用 LA
完全在 WAMP 中开发,我需要将其部署在组织中的 LAMP 设置上。我想确保部署顺利进行并花费尽可能少的时间。在将其部署到 LAMP 之前,我需要更改哪些内容?还有什么方法可以在一些模拟的 LAMP
在变得有点疏远开源,并花了几年时间在 ASP.NET 中开发 Web 应用程序之后,我将开始做相当多的PHP/MySQL开发。 我已经很轻松地安装了WampServer在我的 Windows 机器上建
关闭。这个问题需要更多focused .它目前不接受答案。 想改善这个问题吗?更新问题,使其仅关注一个问题 editing this post . 6年前关闭。 Improve this questi
我正在尝试遵循一些与AWS相关的亚马逊教程(http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html)。这将允许我在我刚
我想在 Azure 服务器中设置 LAMP,可以使用以下方法设置 LAMP LAMP 包:sudo apt-get install lamp-server^ Apache、PHP、MySQL 单独安装
搭建LAMP Web服务器 在家中翻到了以前用的老电脑,在思索一番后,决定把这台电脑改造成一台Web服务器,作为我自己搭建博客的测试机器。 一、Linux服务器 LAMP中的L指的是Linux服
关闭。这个问题是off-topic .它目前不接受答案。 想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。 10年前关闭。 Improve this
请向我推荐一个基于Web的简单文档存储库,用于保存我的小公司文档(.DOC,.PDFs),以便我可以从任何地方访问它们。互联网上有很多可用的工具,但是它们很繁琐,并且充满了不必要的功能和要求。 我没有
我有一个个人项目已经在线一段时间了。我一直在通过这样做来记录下载量: 当用户点击下载链接时,它会点击一个 PHP 脚本,该脚本将一些信息写入表格。 写入数据后,脚本会返回实际文件的路径。 然后用户可以
我是 Ubuntu 的新手。安装灯。有几个问题 1)假设第一个网站目录看起来像:var/www/first/和第二个网站:var/www/second。如何设置多个网站,并将它们与 IIS 上的单独端
我的应用程序在 LAMP 服务器上运行时遇到了一些困难。我将解释该场景,下面我将介绍我的配置和一些 AB 结果。 我正在运行一个使用 Laravel 4.2 开发的应用程序。这是一个问答游戏,在某个时
情况: 我制作了一个可以打开和关闭灯的 Java 应用程序。现在我需要更改灯光,这必须发生在 class ColorLamp 中。正常的“黄”灯放在 class Lamp 中。 类 Colorlamp
嗨,最近我安装了 linux 并安装了 lamp + phpmyadmin,这个脚本在 xampp 上运行良好,而我使用了 win,但现在它不会执行,我已经更改了 dbconnect.php 文件中的
我在 Google 云上的 VM 实例上安装了 LAMP,但是当我尝试使用从 Linux 终端远程访问 mysql 数据库时 $ mysql -u username -h ipaddress -p 输
我在 EasyPHP 3.5.9 上开发了我的 php 软件,一切都很完美,现在我在 ubuntu 12.04 x64 上安装了 LAMP。如果我尝试在 ubuntu 上上传我的软件,我会显示一个白页
我最近(大约1个月)开始使用LAMP和Bootstrap。 我开发的网站在重新安装 LAMP 之前一直运行良好。 这是我的进展: 0. reinstalled LAMP 1. moved my "ba
我的项目驻留在一个共享的 Linux 托管服务器上。当然,托管服务提供商已经设置了相对于其他服务器用户的必要目录和文件所有权。我现在关心的是如何在我的域中设置权限,以便我的用户可以读取他们应该拥有的文
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 11 年前。 Improve thi
我是一名优秀的程序员,十分优秀!