1. linux中怎么看mysql apahce php安装了哪些组件
安装好了以后你自在你的网站根目录新建一个info.php文件,在里面写上这一段
<?php
phpinfo();
?>
然后你访问这个文件,例如:http://127.0.0.1/info.php
如果你的环境没问题的话,你会看到一大串列表,其中php块,apache块,mysql块有你想要的i信息。
2. PHP模板怎么用
1, 你的服务器装了apahce吗?必须要安装apache+php+mysql,zend是自带的;
2, 如果上面装好了,你可以版先不传你的权php模板,在ie中输入你的服务器的ip地址,如果端口不是默认的80,你就加上端口;看看能否打开主页,默认的是 It Works!
3, 都OK后,你传你的文件到apache文件夹下的htdocs文件夹下,然后在浏览器输入你的ip+端口+文件目录+install然后开始一步步安装。
3. linux下安装apahce+php+mysql的视频
是以什么方式安装的,rpm 还是编译?
1:mysql setup
./configure --prefix=/usr/local/mysql --with-mysqld-ldflags=-all-static --with-embedded-server --with-plugins=innobase -enable-assembler
make && make install
groupadd mysql #设置mysql用户无home,shell
useradd mysql -c "start mysqlds account" -d /dev/null -g mysql -s /sbin/nologin
****** ./scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --user=mysql #初始化数据库
cd /usr/local/mysql
chmod -R 700 ./var
chown -R mysql:mysql var
****** cp support-files/my-medium.cnf /etc/my.cnf #cp模板为配置文件,模板位于源目录
chown root:sys /etc/my.cnf
chmod 644 /etc/my.cnf #若单机用,去掉"#"为"--skip-networking";可添加log-slow-queries[=file] #命令执行时间超过long_query_time的写入file文件;skip-show-database一般用户不能浏览数据库
cp /usr/local/mysql/share/mysql/mysql.server /etc/rc.d/init.d/mysqld
chmod 700 /etc/rc.d/init.d/mysqld
rm -f .bash_history .mysql_history
ln -s /dev/null .bash_history(and '.mysql_history') #safe
/usr/local/mysql/bin/mysqld_safe --user=root & #启动服务
/usr/local/mysql/bin/mysqladmin -u root password abcde #设置密码为abcde
echo "/usr/local/mysql/lib/mysql/lib" >> /etc/ld.so.conf #设置自动启动
vi /etc/rc.d/rc.local
ldconfig
cd /usr/local/mysql; /usr/local/mysql/bin/mysqld_safe --user=mysql &
vi /etc/profile #添加到全局环境变量
PATH="$PATH":/usr/local/mysql/bin
export PATH ....(略).... #添加到这一行上面
/usr/local/mysql/bin/mysql -u root -p #测试一下账号
2:apache setup
./configure --prefix=/usr/local/apache --enable-so --enable-rewrite --enable-moles=most --enable-mods-shared=most --enable-ssl=static --with-ssl=/usr/lib/openssl
make
make install
curl http://localhost #启动服务测试运行
echo "/usr/local/apache/bin/apachectl start &" >> /etc/rc.d/rc.local #自动运行
PATH="$PATH":/usr/local/mysql/bin:/usr/local/apache/bin #添加变量
vi httpd.conf
AddType application/x-httpd-php .php .phtml #加入
AddType application/x-httpd-php-source .phps #加入
DirectoryIndex index.html index.php index.html.var #增加index.php
4:php setup
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-gd=/usr/local/libgd --enable-gd-native-ttf --with-ttf --enable-gd-jis-conv --with-freetype-dir=/usr/local/freetype --with-jpeg-dir=/usr/local/libjpeg --with-png-dir=/usr/local/libpng --with-libxml-dir=/usr/local/libxml2 --with-zlib-dir=/usr/local/zlib --with-mcrypt=/usr/local/libmcrypt --with-curl=/usr/include/curl --enable-xml --enable-mbstring --enable-sockets --enable-ftp --with-mhash=/usr/local/mhash
make
make install
******* cp php.ini-dist /usr/local/php5/lib/php.ini #php配置文件
/etc/profile 加入PATH":/usr/local/php5/bin"
关闭 SELinux
vi /etc/sysconfig/selinux
屏蔽掉,
#SELINUX=enforcing
然后添加
SELINUX=disabled
以上是个人测试通过...个人笔记....
4. org.apahce.hadoop.hive.ql.exec.udf 在哪个包里
你说的应该是hive的udf吧?
udf的源码如下:
package org.apache.hadoop.hive.ql.exec;
import org.apache.hadoop.hive.ql.udf.UDFType;
@UDFType(
deterministic = true
)
public class UDF {
private UDFMethodResolver rslv;
// 后面省略
可以看到,类UDF在包org.apache.hadoop.hive.ql.exec下,如果要专使用hive的udf,需要用到以下依属赖:
我用的是maven pom, pom依赖如下:
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<version>2.1.0</version>
</dependency>